Configure specs
This commit is contained in:
parent
a1ff5eae35
commit
2304194b6a
4 changed files with 15 additions and 1 deletions
3
Gemfile
3
Gemfile
|
@ -98,4 +98,7 @@ group :test do
|
|||
# Code coverage for Ruby 1.9+ with a powerful configuration library
|
||||
# and automatic merging of coverage across test suites.
|
||||
gem 'simplecov', '~> 0.16', require: false
|
||||
|
||||
# Simple one-liner tests for common Rails functionality.
|
||||
gem 'shoulda-matchers', '4.0.0.rc1'
|
||||
end
|
||||
|
|
|
@ -188,6 +188,8 @@ GEM
|
|||
sassc (2.0.0)
|
||||
ffi (~> 1.9.6)
|
||||
rake
|
||||
shoulda-matchers (4.0.0.rc1)
|
||||
activesupport (>= 4.2.0)
|
||||
simplecov (0.16.1)
|
||||
docile (~> 1.1)
|
||||
json (>= 1.8, < 3)
|
||||
|
@ -245,6 +247,7 @@ DEPENDENCIES
|
|||
rspec-rails (~> 3.8)
|
||||
rubocop (~> 0.60.0)
|
||||
sass-rails (~> 5.0)
|
||||
shoulda-matchers (= 4.0.0.rc1)
|
||||
simplecov (~> 0.16)
|
||||
spring
|
||||
spring-watcher-listen (~> 2.0.0)
|
||||
|
|
|
@ -29,7 +29,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 and applies them before tests are run.
|
||||
# If you are not using ActiveRecord, you can remove these lines.
|
||||
|
|
8
spec/support/shoulda_matchers.rb
Normal file
8
spec/support/shoulda_matchers.rb
Normal file
|
@ -0,0 +1,8 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
Shoulda::Matchers.configure do |config|
|
||||
config.integrate do |with|
|
||||
with.test_framework :rspec
|
||||
with.library :rails
|
||||
end
|
||||
end
|
Reference in a new issue