class_dependencies 0.5.0 → 0.5.1

Sign up to get free protection for your applications and to get access to all the features.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.5.0
1
+ 0.5.1
@@ -131,7 +131,7 @@ module ClassDependencies
131
131
 
132
132
  def all_dependencies_of(from)
133
133
  from_sym = class_to_sym(from)
134
- find_dependencies_of(from_sym, Set.new()).delete(from).to_a
134
+ find_dependencies_of(from_sym, Set.new()).delete(from_sym).to_a
135
135
  end
136
136
 
137
137
  def ordered_dependencies
@@ -33,6 +33,13 @@ describe "ClassDependencies" do
33
33
  BaseDep.descendant_classes == [A, B, C]
34
34
  end
35
35
 
36
+ it "should not return the root in all_dependencies_of" do
37
+ BaseDep.all_dependencies_of(A).to_set.should == [:b,:c].to_set
38
+ BaseDep.all_dependencies_of(:a).to_set.should == [:b,:c].to_set
39
+ BaseDep.all_dependencies_of(B).should == [:c]
40
+ BaseDep.all_dependencies_of(:b).should == [:c]
41
+ end
42
+
36
43
  module AnotherDep
37
44
  include ClassDependencies
38
45
 
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 5
8
- - 0
9
- version: 0.5.0
8
+ - 1
9
+ version: 0.5.1
10
10
  platform: ruby
11
11
  authors:
12
12
  - mccraig mccraig of the clan mccraig