Skip to content

Backend Automated Testing

Andrew Schutt edited this page Oct 3, 2020 · 4 revisions

All Tests

rspec

Specific Tests

Specific File

rspec ./spec/services/profile_picture_spec.rb

Specific Block/Line

rspec ./spec/services/profile_picture_spec.rb:16

Specific Test

Add the :focus attribute to any of it, context, describe, or test to only run the tests in that context.

it 'renders the index template', :focus do
  get strategies_path
  expect(response).to render_template('index')
end

Running plain old rspec will now ONLY run this test

This is enabled by config.filter_run_when_matching :focus in spec/spec_helper.rb

Clone this wiki locally