Displaying 3 results from an estimated 3 matches for "articles_controller_test".
2006 Feb 01
3
Test data life cycle confusion
...to become dependent
on the results of previous tests.
Well, I''ve been running into a brick wall with some functional tests
based off of what the scaffold generator created for me.
Here''s a couple snippets:
articles.yml:
first:
id: 1
published: 1
publish_on: 2006-01-24 14:50:30
articles_controller_test.rb:
<snip>
def test_edit
get :edit, :id => 1, :version_id => 1
assert_response :success
assert_template ''edit''
assert_not_nil assigns(:article)
assert assigns(:article).valid?
end
def test_destroy
assert_not_nil Article.find(1)
post :destroy, :id => 1
assert_resp...
2007 Feb 06
2
Testing RJS actions
...e/francois/src/config/../vendor/rails/actionpack/lib/action_controller/assertions/response_assertions.rb:112:in
`assert_template'
/home/francois/src/config/../vendor/rails/actionpack/lib/action_controller/assertions/response_assertions.rb:109:in
`assert_template'
./test/functional/articles_controller_test.rb:84:in `test_destroy_xhr'
/home/francois/src/config/../vendor/plugins/mocha/lib/mocha/test_case_adapter.rb:19:in
`run']:
expecting <"destroy.rjs"> but rendering with <nil>
Generally, how do we specify the type of request we are sending to the action ?
Thanks !...
2006 May 11
2
Unit tests fail with sqlite3 and rails 1.1
...s. When I run my tests I get this:
$ rake
(in /home/www/art2)
/usr/bin/ruby -Ilib:test
"/usr/lib/ruby/gems/1.8/gems/rake-0.7.1/lib/rake/rake_test_loader.rb"
"test/functional/panoramas_controller_test.rb"
"test/functional/links_controller_test.rb"
"test/functional/articles_controller_test.rb"
"test/functional/categories_controller_test.rb"
"test/functional/rss_controller_test.rb"
"test/functional/photos_controller_test.rb"
Loaded suite /usr/lib/ruby/gems/1.8/gems/rake-0.7.1/lib/rake/rake_test_loader
Started
............................................