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

Associations Deprecation Warning #54

Open
BrianHicks opened this issue Sep 12, 2010 · 3 comments
Open

Associations Deprecation Warning #54

BrianHicks opened this issue Sep 12, 2010 · 3 comments

Comments

@BrianHicks
Copy link

I get the following warning when using associations:

DEPRECATION WARNING: Object#returning has been deprecated in favor of Object#tap. (called from block (2 levels) in <top (required)> at ~/SP/spec/spec_helper.rb:73)

The relevant line of code is...

Survey.blueprint do user name { Faker::Lorem.words(3).join(" ") } intro { Faker::Lorem.paragraph } pubid { 7.times.map { ('a'..'z').to_a.sample }.join } pubdate { 1.days.ago } enddate { 7.days.from_now } end

which is called in the test...

it 'should have surveys' do @u.surveys.make end

where @U is a user object.

I'm using ruby version 1.9.2p0, Rails 3, and Machinist 2.0.0.beta2 managed by RVM.

@BrianHicks
Copy link
Author

Wow, it definitely removed all the line breaks from my code. Rest assured, it's not all on one line.

@bittersweet
Copy link

I think this has to do with the faker gem, I can't find returning in the machinist code anywhere, while faker has 3 instances of it. Relevant file is lib/faker/lorem.rb lines 15 and 27.

To bad the faker gem is not on GitHub as far as I know.

@bittersweet
Copy link

You can use the 'ffaker' gem as it's maintained and supposedly faster.

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