Adding an example for show.mobile.erb for a user model so that you don't encounter any gotchas. This is using the same example from above:
setup do @user = users(:testuser) end test "should get show.mobile.erb" do @request.accept = "mobile" get :show, :id => @user.to_param, :format => 'mobile' assert_response :success assert_select "div[data-role=header]" do assert_select 'h1', 'Your Header Title' end end Make sure that when you test this statement: get :show, :id => @user.to_param .. that you add , :format => 'mobile' .. or you will encounter a 406 error. In addition, don't try to pass a symbol for :mobile in the get request or you will encounter the same 406 error. Thanks. -- Posted via http://www.ruby-forum.com/. -- 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 this group at http://groups.google.com/group/rubyonrails-talk?hl=en.