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

WIP: Seed photos #712

Closed
wants to merge 6 commits into from
Closed

WIP: Seed photos #712

wants to merge 6 commits into from

Conversation

maco
Copy link
Member

@maco maco commented Feb 17, 2015

Fixes #495

This is almost ready. After @sksavant finishes with #679 I'll add seeds to the list in there. Then it'll be ready.

@coveralls
Copy link

Coverage Status

Coverage increased (+0.09%) to 83.49% when pulling 9e5a620 on maco:seed_photos into 28288c5 on Growstuff:dev.

context 'photos' do
before(:each) do
@seed = FactoryGirl.create(:seed)
@photo = FactoryGirl.create(:photo)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it possible to just define the association in the call to create? Something like:

@photo = FactoryGirl.create(:photo, :seed => @seed)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No idea. I'm really in "copy and paste what someone else did, then poke it a little" mode when it comes to the spec files.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It certainly is (and can make things a lot neater with complex graphs of objects), but it might be even better to consider a "seed-with-complete-data" factory that has some smart defaults.

https://github.com/thoughtbot/factory_girl/blob/master/GETTING_STARTED.md#associations

@maco maco added this to the Release 9 milestone Apr 7, 2015
@pozorvlak
Copy link
Member

The build's failing because of a one-character error on line 22 of app/views/photos/show.html.haml - replace @photos with @photo.

@maco
Copy link
Member Author

maco commented Jul 17, 2015

Oh thanks. Still need to figure out writing feature tests though :-/

@cesy
Copy link
Member

cesy commented Aug 20, 2015

Let us know if you'd like any help with writing feature tests - we can set up a pairing session or something if you want.

@maco
Copy link
Member Author

maco commented Aug 20, 2015

Yes, please!

On Thu, Aug 20, 2015 at 10:48 AM Cesy notifications@github.com wrote:

Let us know if you'd like any help with writing feature tests - we can set
up a pairing session or something if you want.


Reply to this email directly or view it on GitHub
#712 (comment).

@cesy cesy modified the milestones: Release 9, Release 11 May 16, 2016
@maco maco modified the milestones: Release 12, Release 11 May 25, 2016
@maco
Copy link
Member Author

maco commented May 25, 2016

Moving to release 12, because 11 is for bug fixes

On one of the photo PRs, Skud mentioned we probably ought to be using concerns rather than having duplicating so much code, so I'm leaning toward doing that refactor as part of this, before I go and commit even more duplicate code to the repo. Which means I should probably close this PR and open a new one with a branch that has DRYer code.

@maco maco modified the milestones: Release 12, Release 13 Jun 20, 2016
@CloCkWeRX CloCkWeRX modified the milestones: Release 13, Release 14 Jul 8, 2016
@CloCkWeRX CloCkWeRX modified the milestones: Release 14, Release 13 Jul 8, 2016
@cesy cesy modified the milestones: Release 14, Release 15 Aug 3, 2016
@cesy cesy modified the milestone: Release 15 Aug 24, 2016
@maco maco closed this Nov 30, 2016
@maco maco deleted the seed_photos branch November 30, 2016 05:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Seed photos
7 participants