cookbook 0.1.2 → 0.1.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -42,17 +42,6 @@ RSpec.describe Cookbook::Use, type: :model do
42
42
  it { should belong_to(:use_in) }
43
43
  end
44
44
 
45
- describe 'Scopes' do
46
- describe '.recipe_uses' do
47
- subject { Cookbook::Use.recipe_uses }
48
- it { should include(full_use) }
49
- end
50
- describe '.ingredient_uses' do
51
- subject { Cookbook::Use.ingredient_uses }
52
- it { should include(full_use) }
53
- end
54
- end
55
-
56
45
  describe 'Methods' do
57
46
  describe '#quantity' do
58
47
  describe 'when min and max exist' do
@@ -61,11 +50,11 @@ RSpec.describe Cookbook::Use, type: :model do
61
50
  end
62
51
  describe 'with just min' do
63
52
  subject { use_no_max_no_unit.quantity }
64
- it { should eq '0.25' } # ndash, not hyphen
53
+ it { should eq '0.25' }
65
54
  end
66
55
  describe 'with just max' do
67
56
  subject { use_no_min_no_unit.quantity }
68
- it { should eq '2' } # ndash, not hyphen
57
+ it { should eq '2' }
69
58
  end
70
59
  end
71
60
  describe '#quantity and unit' do
@@ -7,12 +7,12 @@ RSpec.describe HowTo, type: :model do
7
7
  it { should have_many(:uses) }
8
8
 
9
9
  it { should_not have_many(:ingredient_uses) }
10
- it { should_not have_many(:ingredients).through(:uses) }
10
+ it { should_not have_many(:ingredients).through(:ingredient_uses) }
11
11
 
12
12
  it { should have_many(:supply_uses) }
13
- it { should have_many(:supplies).through(:uses) }
13
+ it { should have_many(:supplies).through(:supply_uses) }
14
14
 
15
15
  it { should have_many(:tool_uses) }
16
- it { should have_many(:tools).through(:uses) }
16
+ it { should have_many(:tools).through(:tool_uses) }
17
17
  end
18
18
  end
@@ -7,12 +7,12 @@ RSpec.describe Recipe, type: :model do
7
7
  it { should have_many(:uses) }
8
8
 
9
9
  it { should have_many(:ingredient_uses) }
10
- it { should have_many(:ingredients).through(:uses) }
10
+ it { should have_many(:ingredients).through(:ingredient_uses) }
11
11
 
12
12
  it { should have_many(:supply_uses) }
13
- it { should have_many(:supplies).through(:uses) }
13
+ it { should have_many(:supplies).through(:supply_uses) }
14
14
 
15
15
  it { should have_many(:tool_uses) }
16
- it { should have_many(:tools).through(:uses) }
16
+ it { should have_many(:tools).through(:tool_uses) }
17
17
  end
18
18
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cookbook
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
4
+ version: 0.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Loren Lundgren
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-09-13 00:00:00.000000000 Z
11
+ date: 2021-09-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails