I've been developing a website with RoR, I can view it on the browser locally, but when I run 'bundle rake test' I get this error:
1) Error: StaticPagesControllerTest#test_should_get_home: ActiveRecord::RecordNotFound: Couldn't find Datum with 'id'=1 app/controllers/static_pages_controller.rb:3:in
home' test/controllers/static_pages_controller_test.rb:5:inblock in '2) Error: SiteLayoutTest#test_layout_links: ActiveRecord::RecordNotFound: Couldn't find Datum with 'id'=1 app/controllers/static_pages_controller.rb:3:in
home' test/integration/site_layout_test.rb:5:inblock in '
I want to display content on my home page. This is the StaticPagesController content
def home @datum = Datum.find(1) end
And this is how I'm displaying the content:
I'll appreciate any help!
Aucun commentaire:
Enregistrer un commentaire