-
-
Save dchelimsky/159174 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Scenario "has three steps" do | |
Given "one" do | |
end | |
When "two" do | |
end | |
Then "three" do | |
end | |
end | |
Scenario "defines macros inline" do | |
# This defines a step named "this step with" | |
Given "this step with", "foo" do |arg| | |
arg.should == "foo" | |
end | |
# This invokes the "this step with" step with the arg "bar" (and consequently fails) | |
Given "this step with", "bar" | |
end | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
describe "normal scenario" do | |
series "three steps" do | |
step "one" do | |
:foo.should == :foo | |
a { :foo == :foo } | |
:foo.should_not == :bar | |
a { :foo != :bar } | |
a { :foo }.must be :foo | |
a { :foo }.must_not be :bar | |
a { :foo }.must == :bar | |
an { Einstein.new }.must be :smart? | |
end | |
step "two" do | |
a {1}.to be(1) | |
a {1 == 1} | |
end | |
step "three" do | |
end | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment