Skip to content
This repository has been archived by the owner on Feb 22, 2024. It is now read-only.

Commit

Permalink
Issue #32
Browse files Browse the repository at this point in the history
  • Loading branch information
bploetz committed Jan 6, 2015
1 parent 2b08a7d commit 3eb24f5
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions README.markdown
Expand Up @@ -200,13 +200,12 @@ MyApi::Application.routes.draw do
end
```

## A Note About Testing When Using The HTTP Header or Request Parameter Strategies
## A Note About Testing

Rails functional tests (ActionController::TestCase) and RSpec Controller specs are for testing controller action methods in isolation.
They do not go through the full Rails stack, specifically the Rails dispatcher code path, which is where versionist hooks in to do its thing.

In order to test your versioned API routes which rely on the HTTP Header or Request Parameter strategies, use integration tests (ActionDispatch::IntegrationTest)
if you're using Test::Unit, or Request specs if you're using RSpec.
In order to test your versioned API routes, use integration tests (ActionDispatch::IntegrationTest) if you're using Test::Unit, or Request specs if you're using RSpec.

Test::Unit Example:
```ruby
Expand Down

0 comments on commit 3eb24f5

Please sign in to comment.