Sha256: f13e6dd20d505c3aac20b207947448dc1411810e13de19e2faf8a83217efd6e7

Contents?: true

Size: 485 Bytes

Versions: 4

Compression:

Stored size: 485 Bytes

Contents

# frozen_string_literal: true

require 'rails_helper'

RSpec.describe Recipe, type: :model do
  describe 'Relationships' do
    it { should have_many(:uses) }

    it { should have_many(:ingredient_uses) }
    it { should have_many(:ingredients).through(:ingredient_uses) }

    it { should have_many(:supply_uses) }
    it { should have_many(:supplies).through(:supply_uses) }

    it { should have_many(:tool_uses) }
    it { should have_many(:tools).through(:tool_uses) }
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
cookbook-0.1.6 spec/models/recipe_spec.rb
cookbook-0.1.5 spec/models/recipe_spec.rb
cookbook-0.1.4 spec/models/recipe_spec.rb
cookbook-0.1.3 spec/models/recipe_spec.rb