[Rails] Re: Testing if a controller renders a JS Template

2013-08-02 Thread andreo
Joao, I am not sure you getting testing right! everytime you find something like this that looks hard to test, maybe you should rethink your tests. I Would for example on controller testing, which is functional, be more worried to test, if the function did what it was supposed to and on the fe

[Rails] Re: Testing if a controller renders a JS Template

2013-08-01 Thread João Pereira
I found the the xml_http_request or alias xhr for that test "should render js to show the change password form" do sign_in_user xhr :get, :enable_password_change assert_template :enable_password_change assert_response :ok assert assigns(:merchant_user)end http://jpereira.e