Skip to content

Instantly share code, notes, and snippets.

@btakita
Created July 31, 2009 07:06
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save btakita/159123 to your computer and use it in GitHub Desktop.
Save btakita/159123 to your computer and use it in GitHub Desktop.
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
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