Created
October 20, 2017 15:07
-
-
Save domagude/5d7798e0ffdda3108cc84aa8f5969ed1 to your computer and use it in GitHub Desktop.
This file contains 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
require 'rails_helper' | |
RSpec.describe Category, type: :model do | |
context 'Associations' do | |
it 'has_many posts' do | |
association = described_class.reflect_on_association(:posts) | |
expect(association.macro).to eq :has_many | |
end | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment