Displaying 2 results from an estimated 2 matches for "posts_controller_test".
Did you mean:
host_controller_test
2012 Jun 26
2
Error with rake command
...tests/s, 0.0000 assertions/s.
0 tests, 0 assertions, 0 failures, 0 errors, 0 skips
Run options:
# Running tests:
.FFF.F.E
Finished tests in 0.671677s, 11.9105 tests/s, 11.9105 assertions/s.
1) Failure:
test_should_create_post(PostsControllerTest)
[/home/ms/Desktop/rails3/blog/test/functional/posts_controller_test.rb:20]:
"Post.count" didn''t change by 1.
<3> expected but was
<2>.
2) Failure:
test_should_destroy_post(PostsControllerTest)
[/home/ms/Desktop/rails3/blog/test/functional/posts_controller_test.rb:43]:
"Post.count" didn''t change by -1.
<1> e...
2012 Apr 09
8
Rails Functional Testing Problem
I''m trying to run some functional tests on Rails. However I am coming up
with the following error.
RuntimeError: Called id for nil, which would mistakenly be 4 -- if you
really wanted the id of nil, use object_id
app/controllers/posts_controller.rb:11:in `create''
posts_controller_test.rb:5:in `test_should_create''
Here is my test file
require File.dirname(__FILE__) + "/../test_helper"
class PostsControllerTest < ActionController::TestCase
def test_should_create
post :create, :post => { :message => ''Sausage and Egg Sandwich''}
end...