Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

breaks be_* handlers #42

Open
egh opened this issue May 19, 2015 · 1 comment
Open

breaks be_* handlers #42

egh opened this issue May 19, 2015 · 1 comment

Comments

@egh
Copy link

egh commented May 19, 2015

To reproduce, create a new rails 4.2.1 project, add rspec-rails and generator_spec to Gemfile, run rails generate rspec:install, then create the following generator test:

require 'rails_helper'
require 'generator_spec'

describe 'foo', type: :generator do
  it 'works' do
    expect([]).to be_empty
  end
end

This will fail:

1) foo works
     Failure/Error: expect([]).to be_empty
     NoMethodError:
       undefined method `be_empty' for #<#<Class:0x007ff272fac398>:0x007ff272fac2d0>
     # ./spec/generators/foo_spec.rb:6:in `block (2 levels) in <top (required)>'

But if we remove the type: :generator, it will work.

@SampsonCrowley
Copy link

@stevehodgkiss is there any news on this? the issue is 2 years old but latest commit was last year

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants