-
-
Save wmoxam/b3e3df9de255c28e7409 to your computer and use it in GitHub Desktop.
RSpec before woes
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 Organization do | |
before(:each) do | |
puts 'GLOBAL CONTEXT before block' | |
end | |
context 'context 1' do | |
before(:each) do | |
puts "context 1 before block" | |
end | |
it 'should print two before messages 1' do | |
puts "111111111111111111 'should print two before messages 1' 1111111111111111111111" | |
end | |
it 'should print two before messages 2' do | |
puts "111111111111111 'should print two before messages 2' 111111111111111111111" | |
end | |
end | |
context 'context 2' do | |
before(:each) do | |
puts "context 2 before block" | |
end | |
it 'should print two before messages 1' do | |
puts "22222222222222222 'should print two before messages 1' 22222222222222222" | |
end | |
it 'should print two before messages 2' do | |
puts "22222222222222222 'should print two before messages 2' 22222222222222222222" | |
end | |
end | |
end |
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
GLOBAL CONTEXT before block | |
context 1 before block | |
context 2 before block | |
111111111111111111 'should print two before messages 1' 1111111111111111111111 | |
.GLOBAL CONTEXT before block | |
context 1 before block | |
context 2 before block | |
111111111111111 'should print two before messages 2' 111111111111111111111 | |
.GLOBAL CONTEXT before block | |
context 1 before block | |
context 2 before block | |
22222222222222222 'should print two before messages 1' 22222222222222222 | |
.GLOBAL CONTEXT before block | |
context 1 before block | |
context 2 before block | |
22222222222222222 'should print two before messages 2' 22222222222222222222 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment