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 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit https://groups.google.com/groups/opt_out.
Add render_views https://www.relishapp.com/rspec/rspec-rails/v/2-12/docs/controller-specs/render-views Dheeraj Kumar On Monday 26 November 2012 at 6:15 PM, Mauro wrote:> The test: > > test "should get new" do > get :new, :room_id => @room.name (http://room.name) > assert_template(:ne) > end > > the template new does not exists but the test does not get failure. > Why? > > -- > 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org (mailto:rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org). > To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org (mailto:rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org). > For more options, visit https://groups.google.com/groups/opt_out. > >-- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit https://groups.google.com/groups/opt_out.
On 26 November 2012 13:49, Dheeraj Kumar <a.dheeraj.kumar-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Add render_views > > https://www.relishapp.com/rspec/rspec-rails/v/2-12/docs/controller-specs/render-viewsIs it only for rspec? I''m using unit testing. -- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit https://groups.google.com/groups/opt_out.
On 26 November 2012 12:45, Mauro <mrsanna1-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> 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? Colin -- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit https://groups.google.com/groups/opt_out.
On 26 November 2012 15:43, Colin Law <clanlaw-gM/Ye1E23mwN+BqQ9rBEUg@public.gmane.org> wrote:> On 26 November 2012 12:45, Mauro <mrsanna1-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit https://groups.google.com/groups/opt_out.
On 26 November 2012 18:25, Mauro <mrsanna1-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> On 26 November 2012 15:43, Colin Law <clanlaw-gM/Ye1E23mwN+BqQ9rBEUg@public.gmane.org> wrote: >> On 26 November 2012 12:45, Mauro <mrsanna1-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> 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 did not answer my other question, what happens if you get that action in the browser? Colin -- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit https://groups.google.com/groups/opt_out.
On 26 November 2012 22:23, Colin Law <clanlaw-gM/Ye1E23mwN+BqQ9rBEUg@public.gmane.org> wrote:> On 26 November 2012 18:25, Mauro <mrsanna1-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: >> On 26 November 2012 15:43, Colin Law <clanlaw-gM/Ye1E23mwN+BqQ9rBEUg@public.gmane.org> wrote: >>> On 26 November 2012 12:45, Mauro <mrsanna1-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> 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 did not answer my other question, what happens if you get that > action in the browser?I wonder if it is this bug https://github.com/rails/rails/issues/3849 If you use something like assert_template "something_that _it_should_not_be" does it fail? Colin Colin> > Colin-- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit https://groups.google.com/groups/opt_out.
On 26 November 2012 23:28, Colin Law <clanlaw-gM/Ye1E23mwN+BqQ9rBEUg@public.gmane.org> wrote:> On 26 November 2012 22:23, Colin Law <clanlaw-gM/Ye1E23mwN+BqQ9rBEUg@public.gmane.org> wrote: >> On 26 November 2012 18:25, Mauro <mrsanna1-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: >>> On 26 November 2012 15:43, Colin Law <clanlaw-gM/Ye1E23mwN+BqQ9rBEUg@public.gmane.org> wrote: >>>> On 26 November 2012 12:45, Mauro <mrsanna1-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> 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 did not answer my other question, what happens if you get that >> action in the browser?If I do http://localhost:3000/rooms/stanza-1/reservations/ne Couldn''t find Reservation with id=ne If in the test I do assert_template ''ne'' or assert_template "ne" nothing change, I still have no failure. But the strange thing is: assert_template "nene" or assert_template :nene, then I have a failure. Really don''t understand. -- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit https://groups.google.com/groups/opt_out.
On 27 November 2012 07:57, Mauro <mrsanna1-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> On 26 November 2012 23:28, Colin Law <clanlaw-gM/Ye1E23mwN+BqQ9rBEUg@public.gmane.org> wrote: >> On 26 November 2012 22:23, Colin Law <clanlaw-gM/Ye1E23mwN+BqQ9rBEUg@public.gmane.org> wrote: >>> On 26 November 2012 18:25, Mauro <mrsanna1-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: >>>> On 26 November 2012 15:43, Colin Law <clanlaw-gM/Ye1E23mwN+BqQ9rBEUg@public.gmane.org> wrote: >>>>> On 26 November 2012 12:45, Mauro <mrsanna1-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> 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 did not answer my other question, what happens if you get that >>> action in the browser? > > If I do http://localhost:3000/rooms/stanza-1/reservations/ne > > Couldn''t find Reservation with id=ne > > If in the test I do > assert_template ''ne'' or assert_template "ne" nothing change, I still > have no failure. > But the strange thing is: > assert_template "nene" or assert_template :nene, then I have a failure. > Really don''t understand.Did you look at the bug I suggested, it looks like that is it. https://github.com/rails/rails/issues/3849 Colin> > -- > 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > For more options, visit https://groups.google.com/groups/opt_out. > >-- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit https://groups.google.com/groups/opt_out.