Skip to content

Instantly share code, notes, and snippets.

@maxenglander
Created December 6, 2011 20:10
Show Gist options
  • Save maxenglander/1439749 to your computer and use it in GitHub Desktop.
Save maxenglander/1439749 to your computer and use it in GitHub Desktop.
RSpec2 example with nested before(:all) blocks
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