search for: newsreleasetest

Displaying 2 results from an estimated 2 matches for "newsreleasetest".

2006 Jun 08
1
fixtures instance variable naming
...dn''t expect it! You might have expected an instance of Array. The error occured while evaluating nil.[]" and i first tried (from the agile book) def test_create assert_kind_of NewsRelease, @news_release assert_equal @first.id, @news_release.id end and i get: test_create(NewsReleaseTest): RuntimeError: Called id for nil, which would mistakenly be 4 -- if you really wanted the id of nil, use object_id so, finally -- what is the correct syntax for accessing the fixtures in my tests?
2006 Jun 08
2
accessing fixtures in tests
...it suggestions. i have news_release_test.rb, using new_releases.yml as the fixture file according to the agile book, i should be able to access the fixture properties within my test as such: assert_equal @first_test.id , @news_release.id unfortunately, i try that and get: "test_create(NewsReleaseTest): RuntimeError: Called id for nil, which would mistakenly be 4 -- if you really wanted the id of nil, use object_id" after looking on api.rubyonrails.com, i saw and tried this: @news_releases["first_test"]["id"] and now i get the following error: "NoMethodError: Y...