From 88c7951160a1c5a18d047ddf0fe1261f6932e32c Mon Sep 17 00:00:00 2001 From: Lars Henrik Mai Date: Wed, 17 Feb 2016 08:35:59 +0100 Subject: [PATCH] configure shoulda-matchers --- spec/rails_helper.rb | 2 +- spec/support/shoulda.rb | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) create mode 100644 spec/support/shoulda.rb diff --git a/spec/rails_helper.rb b/spec/rails_helper.rb index cbf35f9..a555fc5 100644 --- a/spec/rails_helper.rb +++ b/spec/rails_helper.rb @@ -20,7 +20,7 @@ require 'rspec/rails' # directory. Alternatively, in the individual `*_spec.rb` files, manually # require only the support files necessary. # -# Dir[Rails.root.join('spec/support/**/*.rb')].each { |f| require f } +Dir[Rails.root.join('spec/support/**/*.rb')].each { |f| require f } # Checks for pending migrations before tests are run. # If you are not using ActiveRecord, you can remove this line. diff --git a/spec/support/shoulda.rb b/spec/support/shoulda.rb new file mode 100644 index 0000000..7d045f3 --- /dev/null +++ b/spec/support/shoulda.rb @@ -0,0 +1,6 @@ +Shoulda::Matchers.configure do |config| + config.integrate do |with| + with.test_framework :rspec + with.library :rails + end +end