They are their own model & validation belongs there
This also future proofs your code for other changes
Added:
4 checks, 1 for successful obj, 3 for missing attributes on recipe model.
Issue: #5
This will blow out several test fixtures
Later, we will need an integration test for the comments, but for now we just trust that disqus knows how to test their own system.
This also blanks out several tests that were problematic or outdated - but just because I didn't delete something or comment it out - doesn't mean those others are good. I did the bare minimum to make this thing work for tests.
None of the tests for recipes that I put in place are ready yet - I used a new generator & it mucked
Also, in the yml files, instead of putting a # id, like user_id: 1, instead put the name of the yml header it will be linking too. Specifically, on this link ... http://guides.rubyonrails.org/testing.html#the-low-down-on-fixtures ... you goto section 3.3.2. If you look, they titled the header "david" & using that you can user_id: david instead of user_id: 1 ... note there's good examples out there, but it's one flexible thing that rails does with YML files.
Removed:
Validation checks for ingredients and directions
Added:
4 checks, 1 for successful obj, 3 for missing attributes on recipe model.
Issue: #5
This will blow out several test fixtures
Later, we will need an integration test for the comments, but for now we just trust that disqus knows how to test their own system.
This also blanks out several tests that were problematic or outdated - but just because I didn't delete something or comment it out - doesn't mean those others are good. I did the bare minimum to make this thing work for tests.
None of the tests for recipes that I put in place are ready yet - I used a new generator & it mucked
Also, in the yml files, instead of putting a # id, like
user_id: 1
, instead put the name of the yml header it will be linking too. Specifically, on this link ... http://guides.rubyonrails.org/testing.html#the-low-down-on-fixtures ... you goto section 3.3.2. If you look, they titled the header "david" & using that you canuser_id: david
instead ofuser_id: 1
... note there's good examples out there, but it's one flexible thing that rails does with YML files.