Skip to content

Instantly share code, notes, and snippets.

@domagude domagude/post_spec.rb
Last active Sep 24, 2018

What would you like to do?
require 'rails_helper'
RSpec.describe Post, type: :model do
context 'Associations' do
it 'belongs_to user' do
association = described_class.reflect_on_association(:user).macro
expect(association).to eq :belongs_to
it 'belongs_to category' do
association = described_class.reflect_on_association(:category).macro
expect(association).to eq :belongs_to

This comment has been minimized.

Copy link

Al-un commented Sep 24, 2018

The duplicate on the user association testing (line 11) is corrected here but the duplicate is still here on your repository:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.