Results 1 to 2 of 2
Thread: Raisl Book: Chapter 9 rake tests
Nov 16, 2007, 13:36 #1
Raisl Book: Chapter 9 rake tests
Anyone else having trouble running the rake test suit? It seems like for every chapter I run into problems...even after double checking codes and even copying the code from the achieve.
Also, I am getting a lot of messages similar to:
..........DEPRECATION WARNING: stories_count See http://www.r
recation for details. (called from stories_count at c:/ruby/li
..DEPRECATION WARNING: votes_count See http://www.rubyonrails
or details. (called from votes_count at c:/ruby/lib/ruby/gems/
Is anyone experiencing these problems? I am using the the latest rails and ruby 1.8.6 RC2.
has anyone chnaged their code after the depreciated warning? Did pass test after?
Nov 19, 2007, 12:42 #2
The index.rhtml file should read:
<h2><%= story_list_heading %></h2> <%= render :partial => 'story', :collection => @stories %>
also, in the test controller find:
def test_should_accept_vote assert ! stories(:another).has_votes? post_with_user :vote, :id => 2 assert assigns(:another).has_votes? end
and replace with:
def test_should_accept_vote assert ! stories(:another).has_votes? post_with_user :vote, :id => 2 assert assigns(:story).reload.has_votes? end