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

289ba4316 broke instantiating factories in Rails 3 #156

Closed
amerine opened this issue Jul 6, 2011 · 9 comments
Closed

289ba4316 broke instantiating factories in Rails 3 #156

amerine opened this issue Jul 6, 2011 · 9 comments
Labels
Milestone

Comments

@amerine
Copy link

amerine commented Jul 6, 2011

I just bumped the version of factory_girl from 2.0.0.rc1 to 2.0.0.rc3 and started receiving errors messages like this:

ArgumentError Exception: Not registered: block_given?

My guess is that 289ba43 somehow broke FactoryGirl in Rails 3.

I can provide code if needed.
But the example is easy.

  1. Create a plain rails 3 app.
  2. Add rspec_rails,
  3. Add factory_girl_rails.
  4. Define a simple factory
FactoryGirl.define do
  factory :provider do
     name "example name"
  end
end

I stuck a debugger in one of my specs and tried the following:

e foo = Factory.create(:provider)
which resulted in the following error:
ArgumentError Exception: Not registered: block_given?

Hopefully this helps.

@ariejan
Copy link

ariejan commented Jul 6, 2011

+1 for this.

@kfaustino
Copy link

+1 since 2.0.0.rc2

@amerine
Copy link
Author

amerine commented Jul 6, 2011

Also, I'm running this on MRI 1.9.2.

@amerine amerine closed this as completed Jul 6, 2011
@amerine amerine reopened this Jul 6, 2011
@fallwith
Copy link

fallwith commented Jul 6, 2011

+1 for our team as well. We're not using factory_girl_rails (not using Rails), just the regular factory_girl. We can't upgrade beyond 2.0.0.rc1.

@ashchan
Copy link

ashchan commented Jul 7, 2011

+1, same issue here.

@cailinanne
Copy link

+1 I also ran into this issue, while trying to get one of the Rails 3.1 starter apps running.

@pvivera
Copy link

pvivera commented Jul 8, 2011

+1, same issue here.

@fallwith
Copy link

fallwith commented Jul 9, 2011

The fix in 2.0.0.rc4 looks good. I can no longer reproduce this problem after upgrading.

@amerine
Copy link
Author

amerine commented Jul 9, 2011

2.0.0.rc4 fixed the issue. Thanks! Closing the ticket.

@amerine amerine closed this as completed Jul 9, 2011
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

7 participants