Integration Tests
An integration test is a test that measures the interaction of multiple systems or parts of your application. They are meant to aspects like the requests and responses coming back from the server, data that ahs changed, business objects that has implemented. We’re not looking to testpage interactivity here, thats can be found in the end to end tests.
Integration tests can be found in the directory spec/requests
.
You can run all integration tests with:
bundle exec rspec spec/requests
To run an individual file you can use:
bundle exec rspec spec/requests/stories_show_spec.rb
To run a specific test case you can use:
bundle exec rspec spec/requests/stories_show_spec.rb:10
where 10
is the line number of the test case that you want to execute.