deep_end 0.0.6 → 0.0.7

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,3 +1,3 @@
1
1
  module DeepEnd
2
- VERSION = "0.0.6"
2
+ VERSION = "0.0.7"
3
3
  end
data/lib/deep_end.rb CHANGED
@@ -1,7 +1,6 @@
1
1
  require "deep_end/version"
2
2
 
3
3
  module DeepEnd
4
-
5
4
  # Errors
6
5
  class SelfDependencyError < StandardError; end
7
6
  class CircularDependencyError < StandardError; end
@@ -13,6 +12,7 @@ module DeepEnd
13
12
  attr_accessor :seen
14
13
  alias_method :seen?, :seen
15
14
  attr_reader :edges
15
+ attr_reader :resolved_dependencies
16
16
 
17
17
  def initialize(key)
18
18
  @key = key
@@ -30,6 +30,12 @@ module DeepEnd
30
30
  sorted_objects = @graph.resolved_dependencies.should_not be_empty
31
31
  end
32
32
 
33
+ it 'with single dependency, there should only be one item' do
34
+ @graph.add_dependency @dependency_a
35
+ sorted_objects = @graph.resolved_dependencies.length.should == 1
36
+ @graph.resolved_dependencies[0].should == @dependency_a
37
+ end
38
+
33
39
  it 'should contain the dependency' do
34
40
  @graph.add_dependency @dependency_a
35
41
  sorted_objects = @graph.resolved_dependencies.should include(@dependency_a)
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: deep_end
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.6
4
+ version: 0.0.7
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: