Created
May 28, 2013 12:08
-
-
Save maltoe/5662305 to your computer and use it in GitHub Desktop.
Shared context / global config before hooks called in wrong order
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_relative 'spec_helper' | |
describe 'A' do | |
describe 'B', :a => :b do | |
it 'succeeds' do | |
puts 'succeeds' | |
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
require 'rspec' | |
require_relative 'shared_context' | |
RSpec.configure do |config| | |
config.before(:all) do | |
@global_variable = 'string' | |
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
require_relative 'spec_helper' | |
describe 'A', :a => :b do | |
it 'fails' do | |
puts 'fails' | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment