versioned_record 0.2.1 → 0.3.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 8d961aed7862c149a656c89584e5e39a36eab865
4
- data.tar.gz: efac3b9ce83e333511c5dba682d0ca4b238384b3
3
+ metadata.gz: 485621958b932f0a1c13be6a89eeb6b915434363
4
+ data.tar.gz: c5ffe378f6cb1d2685a4fa8db6e65028c3baf157
5
5
  SHA512:
6
- metadata.gz: 496b5f7cc0c2d15098bf17b5316253f128e1a7442bb1143c7f6bfdf781586f1b5abbbe1f42b827660d3b79424a4f483089bde85114bfe50de3387f39310ed56a
7
- data.tar.gz: 3ff2e0d96885ea548736e846dd77e8385c9448850affd79d8967905ff227933b7400e53d5e85b83a3bc1ffd44bc5597af6f0d4f339b7f1df740e768a4aebfd0c
6
+ metadata.gz: fea26e33efb1a2f4dd5f458faa26f6b74dfb19aebe1288119c4a1a90f84d2635c8d276675d82682ec19429d9958c52a6ed2637959cd89c8fb8172a8bbef29ae5
7
+ data.tar.gz: c4d33837fd8d60858131fdecda9268a9911f565eb86adf8d7455cfc5aeb0a1bb81731c8fefdff55c67be9fb134f05f842786581f482f01cc0882e3cc9ef7dc4d
data/README.md CHANGED
@@ -72,21 +72,33 @@ Also, the `is_current_version` flag is unset for the old version and set for the
72
72
 
73
73
  ## Associations
74
74
 
75
- ### `belongs_to` A versioned model, but references the latest version (general case)
75
+ ### Simple Belongs Too
76
76
 
77
- A simple `belongs_to` will work
77
+ `belongs_to` A versioned model, but references the latest version (general case)
78
78
 
79
- ### `belongs_to` A versioned model but references a specific version
79
+ A simple `belongs_to` will work as normal but will always refer to the latest version of its parent.
80
80
 
81
- `belongs_to` must specify the `foreign_key` and primary key settings
81
+ ### Composite Belongs To
82
+
83
+ `belongs_to` A versioned model but references a specific version
84
+
85
+ `belongs_to` must specify the `foreign_key` and primary key settings. You should set autosave to false on the `belongs_to` for these types
86
+ of associations.
82
87
 
83
88
  class Contract < ActiveRecord::Base
84
89
  include VersionedRecord
85
- has_many :apprentices, :foreign_key => [:contract_id, :contract_version], primary_key: [:id, :version ]
90
+ has_many :apprentices, {
91
+ foreign_key: [:contract_id, :contract_version],
92
+ primary_key: [:id, :version ]
93
+ }
86
94
  end
87
95
 
88
96
  class Apprentice < ActiveRecord::Base
89
- belongs_to :contract, :foreign_key => [:contract_id, :contract_version], primary_key: [ :id, version ]
97
+ belongs_to :contract, {
98
+ foreign_key: [:contract_id, :contract_version],
99
+ primary_key: [ :id, version ],
100
+ autosave: false
101
+ }
90
102
  end
91
103
 
92
104
  ### `belongs_to` a non-versioned model
@@ -105,7 +117,8 @@ Right now, only PostgreSQL has been tested. MySQL may or may not work but if you
105
117
  ## Limitations
106
118
 
107
119
  * Does not currently work with ActiveRecord 4.1+
108
- * Calling reload on a model will load the latest _version_ of that record, not the specific one. (This is because id will return just the id and not the id/version composite.)
120
+ * Polymorphic belongs to does not work on versioned records
121
+ * HABTM where models on _both_ sides are versioned have not been tested
109
122
 
110
123
 
111
124
  ## Author
@@ -0,0 +1,13 @@
1
+ module ActiveRecord
2
+ class Base
3
+ def self.versioned?
4
+ false
5
+ end
6
+
7
+ def versioned?
8
+ self.class.versioned?
9
+ end
10
+ end
11
+ end
12
+
13
+
@@ -17,7 +17,7 @@ module VersionedRecord
17
17
  @new_attrs = new_attrs.symbolize_keys
18
18
  attrs = @record.attributes.symbolize_keys.merge(@new_attrs.merge({
19
19
  is_current_version: true,
20
- id: @record.id_with_version,
20
+ id: @record.id,
21
21
  version: @record.version + 1
22
22
  }))
23
23
  end
@@ -0,0 +1,18 @@
1
+ module ActiveRecord
2
+ module AttributeMethods
3
+ module Write
4
+ alias_method :write_attribute_original, :write_attribute
5
+
6
+ def write_attribute(attr_name, value)
7
+ #byebug if attr_name == 'contract_id' && Apprenticeship === self
8
+ # We only have a single value to set, but an array was provided
9
+ if !attr_name.kind_of?(Array) && value.kind_of?(Array)
10
+ # Use just the ID and ignore the version
11
+ write_attribute_original(attr_name, value[0])
12
+ else
13
+ write_attribute_original(attr_name, value)
14
+ end
15
+ end
16
+ end
17
+ end
18
+ end
@@ -1,5 +1,9 @@
1
1
  module VersionedRecord
2
2
  module ClassMethods
3
+ def versioned?
4
+ true
5
+ end
6
+
3
7
  # Scope to limit records to only the current versions
4
8
  def current_versions
5
9
  where(is_current_version: true)
@@ -30,7 +30,28 @@ module VersionedRecord
30
30
  association_fields = Array(association_key).map { |key| association_table[key] }
31
31
 
32
32
  if fields.size == 1
33
- eq_predicates = [ association_fields[0].eq(fields[0]), association_table[:is_current_version].eq(true) ]
33
+ eq_predicates = [ association_fields[0].eq(fields[0]) ]
34
+ case association.reflection.macro
35
+ when :belongs_to
36
+ # We don't handle Polymorphic associations at this stage
37
+ if !association.options[:polymorphic]
38
+ if association.reflection.klass.versioned?
39
+ eq_predicates << association_table[:is_current_version].eq(true)
40
+ end
41
+ end
42
+ when :has_and_belongs_to_many
43
+ if association.reflection.klass.versioned?
44
+ if association.reflection.klass.table_name == association_table.name
45
+ eq_predicates << association_table[:is_current_version].eq(true)
46
+ end
47
+ end
48
+ when :has_many, :has_one
49
+ if association.reflection.klass.versioned?
50
+ if association.reflection.klass.table_name == association_table.name
51
+ eq_predicates << association_table[:is_current_version].eq(true)
52
+ end
53
+ end
54
+ end
34
55
  cpk_and_predicate(eq_predicates)
35
56
  else
36
57
  super
@@ -1,3 +1,3 @@
1
1
  module VersionedRecord
2
- VERSION = "0.2.1"
2
+ VERSION = "0.3.0"
3
3
  end
@@ -6,8 +6,10 @@ require 'composite_primary_keys'
6
6
  require 'versioned_record/attribute_builder'
7
7
  require 'versioned_record/class_methods'
8
8
  require 'versioned_record/connection_adapters/postgresql'
9
+ require 'versioned_record/attribute_methods/write'
9
10
  require 'versioned_record/version'
10
11
  require 'versioned_record/composite_predicates'
12
+ require 'versioned_record/active_record_versioning'
11
13
 
12
14
  ActiveRecord::Associations::AssociationScope.include(VersionedRecord::CompositePredicates)
13
15
 
@@ -15,14 +17,14 @@ module VersionedRecord
15
17
  def self.included(model_class)
16
18
  model_class.primary_keys = :id, :version
17
19
  model_class.after_save :ensure_version_deprecation!, on: :create
18
- model_class.send :alias_method, :id_with_version, :id
19
20
  model_class.extend ClassMethods
20
21
  model_class.include InstanceMethods
21
22
  end
22
23
 
23
24
  module InstanceMethods
24
- def id
25
- id_with_version[0]
25
+ # @return just the ID integer value (not the composite id, version key)
26
+ def _id
27
+ id[0]
26
28
  end
27
29
 
28
30
  # Create a new version of the existing record
@@ -82,6 +84,13 @@ module VersionedRecord
82
84
  self.class.where(id: self.id)
83
85
  end
84
86
 
87
+ # Retrieve the current version of an object
88
+ # (May be itself)
89
+ #
90
+ def current_version
91
+ versions.current_versions.first
92
+ end
93
+
85
94
  # Ensure that old versions are deprecated when we save
86
95
  # (only applies on create)
87
96
  def deprecate_old_versions_after_create!
@@ -0,0 +1,31 @@
1
+ require 'spec_helper'
2
+
3
+ describe Sale do
4
+ let!(:versioned_product) { VersionedProduct.create(name: 'iPad', price: 100) }
5
+ let!(:versioned_product_revision) { versioned_product.create_version!(name: 'iPad 2') }
6
+
7
+ describe 'creation via association' do
8
+ subject(:sale) { versioned_product.sales.create(purchaser: 'Dan Draper') }
9
+
10
+ specify 'that the sale belongs to the specific version' do
11
+ expect(subject.versioned_product(true)).to eq(versioned_product)
12
+ end
13
+ end
14
+
15
+ describe 'create directly' do
16
+ let!(:sale) { Sale.create(purchaser: 'Dan Draper', versioned_product: versioned_product_revision) }
17
+
18
+ specify 'that the comment belongs to the specific version' do
19
+ expect(sale.versioned_product(true)).to eq(versioned_product_revision)
20
+ end
21
+
22
+ context 'create another version of the parent' do
23
+ let!(:vp3) { versioned_product_revision.create_version!(name: 'iPad 3') }
24
+
25
+ specify 'that the comment STILL belongs to the specific version' do
26
+ expect(sale.versioned_product(true)).to eq(versioned_product_revision)
27
+ end
28
+ end
29
+ end
30
+ end
31
+
@@ -0,0 +1,15 @@
1
+ require 'spec_helper'
2
+
3
+ describe Package do
4
+ let!(:versioned_product) { VersionedProduct.create(name: 'iPad', price: 100) }
5
+ let!(:versioned_product_revision) { versioned_product.create_version!(name: 'iPad 2') }
6
+
7
+ describe 'creation via association' do
8
+ subject(:package) { versioned_product.packages.create!(dimensions: '100x100') }
9
+
10
+ specify 'that the package belongs to the specific version' do
11
+ expect(subject.versioned_products(true).to_a).to eq([versioned_product])
12
+ end
13
+ end
14
+ end
15
+
@@ -0,0 +1,65 @@
1
+ require 'spec_helper'
2
+
3
+ describe VersionedProduct do
4
+ let!(:versioned_product) { VersionedProduct.create(name: 'iPad', price: 100) }
5
+ let!(:versioned_product_revision) { versioned_product.create_version!(name: 'iPad 2') }
6
+
7
+ # TODO: This maybe should go into a different spec
8
+ describe 'installation' do
9
+ describe 'creation via association' do
10
+ let!(:installation) { versioned_product.create_installation!(installed_by: 'Roger Moore') }
11
+
12
+ specify 'that the installation belongs to the latest version' do
13
+ expect(installation.versioned_product).to eq(versioned_product_revision)
14
+ end
15
+
16
+ specify 'that the latest version of the product has the installation set after reload' do
17
+ expect(versioned_product_revision.reload.installation).to eq(installation)
18
+ end
19
+
20
+ specify 'that the previous version of the product has the installation set after reload' do
21
+ expect(versioned_product.reload.installation).to eq(installation)
22
+ end
23
+ end
24
+
25
+ describe 'direct creation' do
26
+ let(:installation) { Installation.new(installed_by: 'Sean Connery') }
27
+ subject { VersionedProduct.create(name: 'iPad', price: 100, installation: installation) }
28
+
29
+ specify 'that the installation is set and persisted' do
30
+ expect(subject.reload.installation).to eq(installation)
31
+ end
32
+ end
33
+
34
+ describe 'simple test' do
35
+ let(:installation) { Installation.new(installed_by: 'Sean Connery') }
36
+ subject { Office.create(address: 'CQ Sydney', installation: installation) }
37
+
38
+ specify 'that the installation is set and persisted' do
39
+ expect(subject.reload.installation).to eq(installation)
40
+ end
41
+
42
+ end
43
+ end
44
+
45
+ describe 'office' do
46
+ describe 'creation via association' do
47
+ let!(:office) { Office.create!(address: 'Circular Quay, Sydney') }
48
+
49
+ before { versioned_product.office = office }
50
+
51
+ specify "that the office's versioned product is the latest version" do
52
+ expect(office.reload.versioned_product).to eq(versioned_product_revision)
53
+ end
54
+
55
+ specify 'that the previous version of the product has the office set after reload' do
56
+ expect(versioned_product.reload.office).to eq(office)
57
+ end
58
+
59
+ specify 'that the latest version of the product has the office set after reload' do
60
+ expect(versioned_product_revision.reload.office).to eq(office)
61
+ end
62
+ end
63
+ end
64
+ end
65
+
@@ -0,0 +1,31 @@
1
+ require 'spec_helper'
2
+
3
+ describe Comment do
4
+ let!(:versioned_product) { VersionedProduct.create(name: 'iPad', price: 100) }
5
+ let!(:versioned_product_revision) { versioned_product.create_version!(name: 'iPad 2') }
6
+
7
+ describe 'creation via association' do
8
+ subject(:comment) { versioned_product.comments.create(content: 'Awesome') }
9
+
10
+ specify 'that the comment belongs to the latest version' do
11
+ expect(subject.versioned_product).to eq(versioned_product_revision)
12
+ end
13
+ end
14
+
15
+ describe 'create directly' do
16
+ let!(:comment) { Comment.create(content: 'Awesome', versioned_product: versioned_product) }
17
+
18
+ specify 'that the comment belongs to the latest version' do
19
+ expect(comment.versioned_product(true)).to eq(versioned_product_revision)
20
+ end
21
+
22
+ context 'create another version of the parent' do
23
+ let!(:vp3) { versioned_product_revision.create_version!(name: 'iPad 3') }
24
+
25
+ specify 'that the comment STILL belongs to the latest version' do
26
+ expect(comment.versioned_product(true)).to eq(vp3)
27
+ end
28
+ end
29
+ end
30
+ end
31
+
@@ -0,0 +1,15 @@
1
+ require 'spec_helper'
2
+
3
+ describe Tag do
4
+ let!(:versioned_product) { VersionedProduct.create(name: 'iPad', price: 100) }
5
+ let!(:versioned_product_revision) { versioned_product.create_version!(name: 'iPad 2') }
6
+
7
+ describe 'add a tag' do
8
+ let!(:tag_a) { versioned_product.tags.create(name: 'Electronics') }
9
+ let!(:tag_b) { versioned_product.tags.create(name: 'Consumer') }
10
+
11
+ specify { expect(versioned_product_revision).to have(2).tags }
12
+ specify { expect(tag_a.versioned_products.to_a).to eq([versioned_product_revision]) }
13
+ end
14
+
15
+ end
data/spec/spec_helper.rb CHANGED
@@ -9,6 +9,8 @@ require 'byebug'
9
9
 
10
10
  Dir[("./spec/support/**/*.rb")].each {|f| require f}
11
11
 
12
+ ActiveRecord::Base.logger = Logger.new(STDOUT)
13
+
12
14
  # See http://rubydoc.info/gems/rspec-core/RSpec/Core/Configuration
13
15
  RSpec.configure do |config|
14
16
  config.treat_symbols_as_metadata_keys_with_true_values = true
@@ -0,0 +1,3 @@
1
+ class Comment < ActiveRecord::Base
2
+ belongs_to :versioned_product
3
+ end
@@ -0,0 +1,3 @@
1
+ class Company < ActiveRecord::Base
2
+ has_many :users
3
+ end
@@ -4,8 +4,50 @@ ActiveRecord::Base.establish_connection(dbconfig[env]['postgresql'])
4
4
 
5
5
  ActiveRecord::Schema.define :version => 0 do
6
6
 
7
+ create_table :companies, force: true do |t|
8
+ t.string :name
9
+ end
10
+
7
11
  create_table :versioned_products, versioned: true, force: true do |t|
12
+ t.references :company
8
13
  t.string :name
9
14
  t.decimal :price
10
15
  end
16
+
17
+ create_table :comments, force: true do |t|
18
+ t.references :versioned_product
19
+ t.string :content
20
+ end
21
+
22
+ create_table :sales, force: true do |t|
23
+ t.references :versioned_product
24
+ t.integer :versioned_product_version
25
+ t.string :purchaser
26
+ end
27
+
28
+ create_table :tags, force: true do |t|
29
+ t.string :name
30
+ end
31
+
32
+ create_table :tags_versioned_products, force: true, id: false do |t|
33
+ t.references :versioned_product, :tag
34
+ end
35
+
36
+ create_table :packages, force: true do |t|
37
+ t.string :dimensions
38
+ end
39
+
40
+ create_table :packages_versioned_products, force: true, id: false do |t|
41
+ t.references :versioned_product, :package
42
+ t.integer :versioned_product_version
43
+ end
44
+
45
+ create_table :installations, force: true do |t|
46
+ t.references :versioned_product, :office
47
+ t.string :installed_by
48
+ end
49
+
50
+ create_table :offices, force: true do |t|
51
+ t.string :address
52
+ end
11
53
  end
@@ -0,0 +1,4 @@
1
+ class Installation < ActiveRecord::Base
2
+ belongs_to :versioned_product
3
+ belongs_to :office
4
+ end
@@ -0,0 +1,4 @@
1
+ class Office < ActiveRecord::Base
2
+ has_one :installation
3
+ has_one :versioned_product, through: :installation
4
+ end
@@ -0,0 +1,6 @@
1
+ class Package < ActiveRecord::Base
2
+ has_and_belongs_to_many :versioned_products, {
3
+ association_foreign_key: [:versioned_product_id, :versioned_product_version],
4
+ foreign_key: :package_id
5
+ }
6
+ end
@@ -0,0 +1,7 @@
1
+ class Sale < ActiveRecord::Base
2
+ belongs_to :versioned_product, {
3
+ foreign_key: [:versioned_product_id, :versioned_product_version],
4
+ primary_key: [:id, :version ],
5
+ autosave: false
6
+ }
7
+ end
@@ -0,0 +1,3 @@
1
+ class Tag < ActiveRecord::Base
2
+ has_and_belongs_to_many :versioned_products
3
+ end
@@ -2,4 +2,31 @@ class VersionedProduct < ActiveRecord::Base
2
2
  include VersionedRecord
3
3
  validates :name, presence: true
4
4
  validates :name, length: { minimum: 2 }
5
+
6
+ belongs_to :company
7
+
8
+ # Simple Belongs To
9
+ has_many :comments
10
+
11
+ # Composite Belongs To
12
+ has_many :sales, {
13
+ foreign_key: [:versioned_product_id, :versioned_product_version],
14
+ primary_key: [:id, :version ]
15
+ }
16
+
17
+ # Simple HABTM
18
+ has_and_belongs_to_many :tags
19
+
20
+ # Composite HABTM
21
+ has_and_belongs_to_many :packages, {
22
+ foreign_key: [:versioned_product_id, :versioned_product_version],
23
+ association_foreign_key: :package_id
24
+ }
25
+
26
+ # Composite Mutual HABTM
27
+ # TODO location?
28
+
29
+ # Has one and has one through
30
+ has_one :installation
31
+ has_one :office, through: :installation
5
32
  end
@@ -1,7 +1,8 @@
1
1
  require 'spec_helper'
2
2
 
3
3
  describe VersionedProduct do
4
- let!(:first_version) { VersionedProduct.create(name: 'iPad', price: 100) }
4
+ let(:company) { Company.create(name: 'Acme Corp') }
5
+ let!(:first_version) { VersionedProduct.create(name: 'iPad', price: 100, company: company) }
5
6
 
6
7
  shared_examples 'successful version creation' do
7
8
  it 'creates a new version' do
@@ -10,17 +11,30 @@ describe VersionedProduct do
10
11
 
11
12
  it 'unsets current version on first version' do
12
13
  perform
13
- expect(VersionedProduct.find(first_version.id, 0)).to_not be_is_current_version
14
+ expect(VersionedProduct.find(first_version._id, 0)).to_not be_is_current_version
15
+ end
16
+
17
+ describe '#current_version' do
18
+ let!(:old_version) { VersionedProduct.find(first_version._id, 0) }
19
+ let!(:new_version) { perform }
20
+ specify { expect(old_version.current_version).to eq(new_version) }
14
21
  end
15
22
 
16
23
  describe 'the new version' do
17
24
  subject { perform.reload }
18
- specify { expect(subject).to be_is_current_version }
19
- specify { expect(subject.version).to eq(1) }
20
- specify { expect(subject.name).to eq('iPad 2') }
21
- specify { expect(subject.price).to eq(100) }
22
- specify { expect(subject).to be_valid }
23
- specify { expect(subject).to be_persisted }
25
+
26
+ specify do
27
+ expect(subject).to be_is_current_version
28
+ expect(subject).to be_valid
29
+ expect(subject).to be_persisted
30
+ end
31
+
32
+ specify do
33
+ expect(subject.version).to eq(1)
34
+ expect(subject.name).to eq('iPad 2')
35
+ expect(subject.price).to eq(100)
36
+ expect(subject.company).to eq(company)
37
+ end
24
38
  end
25
39
  end
26
40
 
@@ -21,7 +21,7 @@ Gem::Specification.new do |spec|
21
21
  spec.required_ruby_version = '>= 2.0.0'
22
22
 
23
23
  spec.add_runtime_dependency "activerecord", "~> 4.0.0"
24
- spec.add_runtime_dependency 'composite_primary_keys', '>= 6.0.3'
24
+ spec.add_runtime_dependency 'composite_primary_keys', '>= 6.0.5'
25
25
 
26
26
  spec.add_development_dependency "bundler", "~> 1.3"
27
27
  spec.add_development_dependency "rake"
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: versioned_record
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.1
4
+ version: 0.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dan Draper
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-04-30 00:00:00.000000000 Z
11
+ date: 2014-05-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activerecord
@@ -30,14 +30,14 @@ dependencies:
30
30
  requirements:
31
31
  - - ">="
32
32
  - !ruby/object:Gem::Version
33
- version: 6.0.3
33
+ version: 6.0.5
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
38
  - - ">="
39
39
  - !ruby/object:Gem::Version
40
- version: 6.0.3
40
+ version: 6.0.5
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: bundler
43
43
  requirement: !ruby/object:Gem::Requirement
@@ -167,14 +167,28 @@ files:
167
167
  - README.md
168
168
  - Rakefile
169
169
  - lib/versioned_record.rb
170
+ - lib/versioned_record/active_record_versioning.rb
170
171
  - lib/versioned_record/attribute_builder.rb
172
+ - lib/versioned_record/attribute_methods/write.rb
171
173
  - lib/versioned_record/class_methods.rb
172
174
  - lib/versioned_record/composite_predicates.rb
173
175
  - lib/versioned_record/connection_adapters/postgresql.rb
174
176
  - lib/versioned_record/version.rb
177
+ - spec/composite_belongs_to.rb
178
+ - spec/composite_onesided_habtm_spec.rb
179
+ - spec/has_one_through_spec.rb
180
+ - spec/simple_belongs_to_spec.rb
181
+ - spec/simple_onesided_habtm_spec.rb
175
182
  - spec/spec_helper.rb
183
+ - spec/support/comment.rb
184
+ - spec/support/company.rb
176
185
  - spec/support/database.rb
177
186
  - spec/support/database.yml
187
+ - spec/support/installation.rb
188
+ - spec/support/office.rb
189
+ - spec/support/package.rb
190
+ - spec/support/sale.rb
191
+ - spec/support/tag.rb
178
192
  - spec/support/versioned_product.rb
179
193
  - spec/version_class_methods_spec.rb
180
194
  - spec/versions_spec.rb
@@ -204,9 +218,21 @@ signing_key:
204
218
  specification_version: 4
205
219
  summary: Version ActiveRecord models using composite primary keys
206
220
  test_files:
221
+ - spec/composite_belongs_to.rb
222
+ - spec/composite_onesided_habtm_spec.rb
223
+ - spec/has_one_through_spec.rb
224
+ - spec/simple_belongs_to_spec.rb
225
+ - spec/simple_onesided_habtm_spec.rb
207
226
  - spec/spec_helper.rb
227
+ - spec/support/comment.rb
228
+ - spec/support/company.rb
208
229
  - spec/support/database.rb
209
230
  - spec/support/database.yml
231
+ - spec/support/installation.rb
232
+ - spec/support/office.rb
233
+ - spec/support/package.rb
234
+ - spec/support/sale.rb
235
+ - spec/support/tag.rb
210
236
  - spec/support/versioned_product.rb
211
237
  - spec/version_class_methods_spec.rb
212
238
  - spec/versions_spec.rb