Created
December 6, 2011 20:10
-
-
Save maxenglander/1439749 to your computer and use it in GitHub Desktop.
RSpec2 example with nested before(:all) blocks
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
require "spec_helper" | |
describe "An RSpec example using nested before(:all) blocks" do | |
before(:all) do | |
puts "This is called at the beginning of the example" | |
end | |
it "Tests something" do | |
false.should eq(false) | |
end | |
describe "A nested group" do | |
before(:all) do | |
puts "This is called at the beginning of the group" | |
end | |
it "Tests something else" do | |
true.should eq(true) | |
end | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment