Skip to content

Commit c3f1469

Browse files
committed
Update Shoulda Matchers Docs for 3.0.0.rc1
1 parent 22430d8 commit c3f1469

File tree

2 files changed

+18
-23
lines changed

2 files changed

+18
-23
lines changed

spec/rails_helper.rb

-17
Original file line numberDiff line numberDiff line change
@@ -49,20 +49,3 @@
4949
# https://relishapp.com/rspec/rspec-rails/docs
5050
config.infer_spec_type_from_file_location!
5151
end
52-
53-
Shoulda::Matchers.configure do |config|
54-
config.integrate do |with|
55-
# Choose a test framework:
56-
with.test_framework :rspec
57-
# with.test_framework :minitest
58-
# with.test_framework :minitest_4
59-
# with.test_framework :test_unit
60-
61-
# Choose a library:
62-
# with.library :active_record
63-
# with.library :active_model
64-
# with.library :action_controller
65-
# Or, choose all of the above:
66-
with.library :rails
67-
end
68-
end

spec/support/shoulda_matchers.rb

+18-6
Original file line numberDiff line numberDiff line change
@@ -5,20 +5,32 @@
55
# 1. Add shoulda-matchers to Gemfile:
66
#
77
# group :test do
8-
# gem 'shoulda-matchers', require: false
8+
# gem 'shoulda-matchers', '3.0.0.rc1'
99
# end
1010
#
1111
# 2. Create a file like this one you're reading in spec/support/shoulda_matchers.rb:
12-
require 'shoulda/matchers'
13-
12+
Shoulda::Matchers.configure do |config|
13+
config.integrate do |with|
14+
with.test_framework :rspec
15+
16+
# Choose one or more libraries:
17+
# with.library :active_record
18+
# with.library :active_model
19+
# with.library :action_controller
20+
# Or, choose the following (which implies all of the above):
21+
with.library :rails
22+
end
23+
end
1424

1525
# 3. Start using shoulda-matchers. See specs in this project for examples.
1626

1727
# Suggested docs
1828
# --------------
1929
# https://gist.github.com/kyletcarlson/6234923
2030
# https://github.com/thoughtbot/shoulda-matchers#rspec
31+
# https://github.com/thoughtbot/shoulda-matchers#configuration
2132
# https://github.com/thoughtbot/shoulda-matchers#activemodel-matchers
22-
# http://thoughtbot.github.io/shoulda-matchers/v2.7.0/
23-
# http://thoughtbot.github.io/shoulda-matchers/v2.7.0/Shoulda/Matchers/ActiveModel.html
24-
# http://thoughtbot.github.io/shoulda-matchers/v2.7.0/Shoulda/Matchers/ActiveRecord.html
33+
# http://thoughtbot.github.io/shoulda-matchers/
34+
# http://thoughtbot.github.io/shoulda-matchers/docs/v3.0.0.rc1/
35+
# http://thoughtbot.github.io/shoulda-matchers/docs/v3.0.0.rc1/Shoulda/Matchers/ActiveModel.html
36+
# http://thoughtbot.github.io/shoulda-matchers/docs/v3.0.0.rc1/Shoulda/Matchers/ActiveRecord.html

0 commit comments

Comments
 (0)