Created
January 25, 2012 01:04
-
-
Save danivovich/1673928 to your computer and use it in GitHub Desktop.
Shallow copy issue with rspec metadata
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 'outer', :one => { :two => 2 } do | |
context 'inner1' do | |
before do | |
example.metadata[:one][:three] = 3 | |
end | |
it 'should have 3' do | |
example.metadata[:one][:three].should == 3 | |
end | |
end | |
context 'inner2' do | |
it 'should not have 3' do | |
example.metadata[:one][:three].should be_nil # FAIL | |
end | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment