Installazione ShouldaMatchers

Crea il file spec/plugins/shoulda-matchers.rb e aggiungilo al file rails_helper.rb

require 'plugins/shoulda-matchers'

Nello stesso file aggiungere le config dentro al blocco Shoulda::Matchers

Shoulda::Matchers.configure do |config|
  config.integrate do |with|
    with.test_framework :rspec
    with.library :rails
  end
end

A questo link puoi trovare la documentazione di tutti i matchers.

Last updated

Was this helpful?