Last active
April 29, 2021 23:51
-
-
Save johncorderox/405ae0e2c34d0482f15714a340e79883 to your computer and use it in GitHub Desktop.
RSpec with Shoulda Matchers
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Reduce the load of MODEL_NAME.rb with shoulda_matchers | |
context "Associations" do | |
%w(users books authors comments topics emails stories tasks reminders notes todos computers games homes pages).each do |attr| | |
it { should have_many(attr) } | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment