Displaying 2 results from an estimated 2 matches for "postscontrollertest".
2012 Jun 26
2
Error with rake command
...options:
# Running tests:
Finished tests in 0.004364s, 0.0000 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:...
2012 Apr 09
8
Rails Functional Testing Problem
...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
end
Here is my controller
class PostsController < ApplicationController
def index
@posts = Post.all(:order => "created_at DESC&quo...