Created
July 31, 2009 07:06
-
-
Save btakita/159123 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
series "has three steps" do | |
step "one" do | |
end | |
step "two" do | |
end | |
step "three" do | |
end | |
end | |
describe "using macros more easily" do | |
it "does not define a pending spec anymore" | |
it "now calls a macro" | |
it "reminds me to lock", "the door" | |
it "can have", :any, "number of", :arguments, "between text" | |
it "can even have", lambda {"(coroutines?), ahem, special blocks"}, "in between" | |
end | |
macro "can even have", :special_block, "in between" do |special_block| | |
end |
This file contains hidden or 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