Gitiles
Code Review
Sign In
review.gerrithub.io
/
AlexsJones
/
cucumber_example
/
4c8cf4839f956716aa24f2e4a9fc6c4d592a7ede
/
.
/
features
/
step_definitions
/
foo_steps.rb
blob: 72d259f92b7bab33bb3a04b90ca8a31d12f08c8a [
file
] [
log
] [
blame
]
require
"./calculator"
Given
(
/^I have (\d+)$/
)
do
|
arg1
|
@num
=
arg1
.
to_i
end
When
(
/^I chose to increase it by (\d+)$/
)
do
|
arg1
|
puts
@num
=
@num
+
arg1
.
to_i
end
Then
(
/^I should see (\d+)$/
)
do
|
arg1
|
if
@num
!=
arg1
.
to_i
raise
"failed"
end
end