Displaying 3 results from an estimated 3 matches for "articles_url".
2007 Feb 06
2
Testing RJS actions
...cle = mock("article"))
@article.expects(:destroy).returns(true)
delete :destroy, :id => 1, :format => :js
assert_template "destroy.rjs"
end
And my implementation:
def destroy
@article.destroy
respond_to do |format|
format.html { redirect_to articles_url }
format.js { render }
format.xml { head :ok }
end
end
This fails spectacularly:
1) Failure:
test_destroy_xhr(AuthenticatedArticlesControllerTest)
[/home/francois/src/config/../vendor/rails/actionpack/lib/action_controller/assertions/response_assertions.rb:112:in
`assert_t...
2006 Jul 22
12
Community request - can someone show me REST?
I mentioned this in another thread, but I''ve got a formal request now.
After reading tons of stuff about REST, I don''t really get it. I
need to see an example.
I''d like someone to write up an example blog app with these requirements
- RESTful using the simply_restful plugin (or edge rails)
- allows posting of comments to articles
- has categories for posts
No need
2010 Dec 15
5
Having trouble testing :( "superclass mismatch" and can't load "test_helper"
I''m having trouble testing my Rails 3 application. Unit testing
doesn''t work. If I try ruby article_test.rb directly, I get a "no
such file to load" error, and if I try rake test:units or ruby unit/
article_test.rb I get this odd "superclass mismatch for class
ArticlesController" error!
I''m hoping I can get this settled...
My test files were