On 26 November 2012 15:43, Colin Law <clan...@googlemail.com> wrote:
> On 26 November 2012 12:45, Mauro <mrsan...@gmail.com> wrote:
>> The test:
>>
>> test "should get new" do
>>     get :new, :room_id => @room.name
>>     assert_template(:ne)
>>   end
>>
>> the template new does not exists but the test does not get failure.
>> Why?
>
> You have assert_template(:ne), not (:new)  so it is looking for the
> tempate ne.  If that is just a typo in the posting here then please
> copy/paste the actual test.  Often such problems are due to typos in
> the original code and by re-typing in the post the typo is removed (or
> different).
>
> Are you sure it is running the test?  What happens if you add
> assert(false) after the assert_template?  Also what happens if you
> perform the 'new' action from a browser?

It was a typo.
The test is:

test "should get new" do
     get :new, :room_id => @room.name
     assert_template(:ne)
 end


I'm sure template ne does not exist but I have no failures.
If I add assert(false) then I have the failure.
I don't undestand.

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to