soft_destroyable 0.1.7 → 0.1.8

Sign up to get free protection for your applications and to get access to all the features.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.1.7
1
+ 0.1.8
@@ -57,7 +57,7 @@ module SoftDestroyable
57
57
  # returns an array of association symbols that must be managed by soft_destroyable on
58
58
  # destroy and destroy!
59
59
  def soft_dependencies
60
- has_many_dependencies + has_one_dependencies
60
+ has_one_dependencies + has_many_dependencies
61
61
  end
62
62
 
63
63
  def restrict_dependencies
@@ -5,7 +5,7 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{soft_destroyable}
8
- s.version = "0.1.7"
8
+ s.version = "0.1.8"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Michael Kintzer"]
@@ -40,6 +40,11 @@ class ClassMethodTest < Test::Unit::TestCase
40
40
  assert Parent.soft_dependencies.include? :parent_nickname
41
41
  end
42
42
 
43
+ def test_soft_dependency_order
44
+ # verify has_one dependencies are evaluated before has_many
45
+ assert Parent.soft_dependencies.index(:soft_one) < Parent.soft_dependencies.index(:soft_children)
46
+ end
47
+
43
48
  def test_restrict_dependencies
44
49
  assert_equal 4, Parent.restrict_dependencies.count
45
50
 
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: soft_destroyable
3
3
  version: !ruby/object:Gem::Version
4
- hash: 21
4
+ hash: 11
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 1
9
- - 7
10
- version: 0.1.7
9
+ - 8
10
+ version: 0.1.8
11
11
  platform: ruby
12
12
  authors:
13
13
  - Michael Kintzer