rails/rails — Issue #4972: wrong result in functional test for get :create
Author: emyl
Created: 2012-02-09 16:28:21+00:00
State: open

If I write a functional test like this for a RESTful resource:

```ruby
test "should not get create" do
get :create
assert_response 404
end
```

The test fail with the error below, while I think it should not:

```
test_should_get_create(PostsControllerTest) [test/functional/posts_controller_test.rb:21]:
Expected response to be a <404>, but was <302>.
```

Instead, from the console, I receive a correct response:

```
Loading development environment (Rails 3.1.3)
irb(main):001:0> app.get '/posts/create'
=> 404
```

I'm using rails 3.1.3 on ruby 1.8.7