Created
November 29, 2013 22:37
-
-
Save keithrbennett/7712890 to your computer and use it in GitHub Desktop.
Illustrates that before_all applies only to the describe block in which it is defined.
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
describe 'a' do | |
before(:all) { puts 'a' } | |
it 'should be true' do | |
puts 'in test a' | |
end | |
end | |
describe 'b' do | |
before(:all) { puts 'b' } | |
it 'should be true' do | |
puts 'in test b' | |
end | |
end | |
# outputs: | |
# > before_all rspec a_spec.rb | |
# a | |
# in test a | |
# .b | |
# in test b | |
# . | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment