Hi all
I might found issue or it couldn't be. In my routes file I have RESTful
routes for movies as follows:
```
resource :movies
```
When I write test for movies controller#index action
```
it "assigns to @movies" do
post :index
expect(assigns[:movies]).to eq([@movie])
end
```
I defined a route for movies#index with request type as `get` but when I
use `post :index` in my test controller it passes the test. Ideally it
should raise routing error but it didn't. What's happening behind the
covers? Is rails doing magic or rspec doing magic? Could you clarify me?
--
You received this message because you are subscribed to the Google Groups
"rspec" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/rspec/6dac1c7b-7b5a-4937-b4d8-fe7490ad44d9%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.