Skip to content

Instantly share code, notes, and snippets.

@zeroeth
Created November 11, 2010 02:51
Show Gist options
  • Save zeroeth/671907 to your computer and use it in GitHub Desktop.
Save zeroeth/671907 to your computer and use it in GitHub Desktop.
context "something" do
setup do
# outer setup
end
should "do things" do
assert :stuff
end
context "without some extras" do
setup do
# inner setup
end
should "do other things" do
end
end
end
# "something should do things" runs outer setup
# "something without some extras should do other things" runs outer and then inner setup
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment