sajad torkamani

Configure RSpec in a spec_helper.rb file or some file that you include when running RSpec tests.

RSpec.configure do |config|
  config.filter_run focus: true
  config.run_all_when_everything_filtered = true

Now, you can prepend an f to a describe, context or it block to only run that example:

fit 'run only this example' do ... end

The x prefix can also be used to skip a particular example:

xit 'do not run this example' do ... end
Tagged: Ruby