rspec/autorun doesn't honor expose_dsl_globally default
Created by: zeha
The ChangeLog claims expose_dsl_globally would default to true, but this simple test doesn't work:
require 'rspec/autorun'
describe 1 do
it "is < 2" do
expect(1).to be < 2
end
it "has an intentional failure" do
expect(1).to be > 2
end
end
% ruby foo.rb
foo.rb:3:in `<main>': undefined method `describe' for main:Object (NoMethodError)
If I add this line after require 'rspec/autorun'
, it's working as expected:
RSpec.configure { |c| c.expose_dsl_globally = true }