Search code examples
ruby-on-railsrspecrspec-rails

Rspec command to skip view specs


When we rspec command it runs all of the specs. I do not want to run view specs.

Is there way to disable/skip view specs??

Other than making those specs pending..


Solution

  • You should try something like this -

    Use an --exclude-pattern

    rspec --exclude-pattern "spec/views/**/*_spec.rb"
    

    https://www.relishapp.com/rspec/rspec-core/v/3-3/docs/configuration/exclude-pattern