librarian 0.1.1 → 0.1.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (41) hide show
  1. checksums.yaml +4 -4
  2. data/.travis.yml +1 -2
  3. data/CHANGELOG.md +15 -0
  4. data/Gemfile +2 -0
  5. data/VERSION +1 -0
  6. data/lib/librarian/algorithms.rb +133 -0
  7. data/lib/librarian/cli/manifest_presenter.rb +1 -5
  8. data/lib/librarian/dependency.rb +7 -1
  9. data/lib/librarian/environment.rb +20 -2
  10. data/lib/librarian/environment/runtime_cache.rb +101 -0
  11. data/lib/librarian/manifest.rb +7 -1
  12. data/lib/librarian/manifest_set.rb +11 -12
  13. data/lib/librarian/posix.rb +14 -5
  14. data/lib/librarian/resolver.rb +22 -9
  15. data/lib/librarian/resolver/implementation.rb +64 -49
  16. data/lib/librarian/source/git.rb +47 -11
  17. data/lib/librarian/source/git/repository.rb +33 -3
  18. data/lib/librarian/version.rb +1 -1
  19. data/librarian.gemspec +8 -6
  20. data/spec/functional/cli_spec.rb +1 -1
  21. data/spec/functional/posix_spec.rb +6 -8
  22. data/spec/functional/source/git/repository_spec.rb +55 -27
  23. data/spec/functional/source/git_spec.rb +152 -8
  24. data/spec/support/project_path_macro.rb +14 -0
  25. data/spec/unit/action/base_spec.rb +1 -1
  26. data/spec/unit/action/clean_spec.rb +6 -6
  27. data/spec/unit/action/install_spec.rb +5 -5
  28. data/spec/unit/algorithms_spec.rb +131 -0
  29. data/spec/unit/config/database_spec.rb +38 -38
  30. data/spec/unit/dependency/requirement_spec.rb +12 -0
  31. data/spec/unit/dsl_spec.rb +49 -49
  32. data/spec/unit/environment/runtime_cache_spec.rb +73 -0
  33. data/spec/unit/environment_spec.rb +28 -28
  34. data/spec/unit/lockfile/parser_spec.rb +18 -18
  35. data/spec/unit/lockfile_spec.rb +3 -3
  36. data/spec/unit/manifest/version_spec.rb +11 -0
  37. data/spec/unit/manifest_set_spec.rb +20 -20
  38. data/spec/unit/mock/environment_spec.rb +4 -4
  39. data/spec/unit/resolver_spec.rb +61 -20
  40. data/spec/unit/spec_change_set_spec.rb +19 -19
  41. metadata +19 -5
@@ -82,13 +82,13 @@ module Librarian
82
82
  end
83
83
 
84
84
  it "should sort and install the manifests" do
85
- ManifestSet.should_receive(:sort).with(manifests).exactly(:once).ordered { sorted_manifests }
85
+ expect(ManifestSet).to receive(:sort).with(manifests).exactly(:once).ordered { sorted_manifests }
86
86
 
87
87
  install_path.stub(:exist?) { false }
88
- install_path.should_receive(:mkpath).exactly(:once).ordered
88
+ expect(install_path).to receive(:mkpath).exactly(:once).ordered
89
89
 
90
90
  sorted_manifests.each do |manifest|
91
- manifest.should_receive(:install!).exactly(:once).ordered
91
+ expect(manifest).to receive(:install!).exactly(:once).ordered
92
92
  end
93
93
  end
94
94
 
@@ -97,8 +97,8 @@ module Librarian
97
97
  action.stub(:install_manifests)
98
98
 
99
99
  install_path.stub(:exist?) { true }
100
- install_path.should_receive(:rmtree)
101
- install_path.should_receive(:mkpath)
100
+ expect(install_path).to receive(:rmtree)
101
+ expect(install_path).to receive(:mkpath)
102
102
  end
103
103
 
104
104
  end
@@ -0,0 +1,131 @@
1
+ require "librarian/algorithms"
2
+
3
+ module Librarian
4
+ module Algorithms
5
+
6
+ describe AdjacencyListDirectedGraph do
7
+
8
+ describe :cyclic? do
9
+ subject(:result) { described_class.cyclic?(graph) }
10
+
11
+ context "with an empty graph" do
12
+ let(:graph) { { } }
13
+ it { should be false }
14
+ end
15
+
16
+ context "with a 1-node acyclic graph" do
17
+ let(:graph) { { ?a => nil } }
18
+ it { should be false }
19
+ end
20
+
21
+ context "with a 1-node cyclic graph" do
22
+ let(:graph) { { ?a => [?a] } }
23
+ it { should be true }
24
+ end
25
+
26
+ context "with a 2-node no-edge graph" do
27
+ let(:graph) { { ?a => nil, ?b => nil } }
28
+ it { should be false }
29
+ end
30
+
31
+ context "with a 2-node acyclic graph" do
32
+ let(:graph) { { ?a => [?b], ?b => nil } }
33
+ it { should be false }
34
+ end
35
+
36
+ context "with a 2-node cyclic graph" do
37
+ let(:graph) { { ?a => [?b], ?b => [?a] } }
38
+ it { should be true }
39
+ end
40
+
41
+ context "with a 2-scc graph" do
42
+ let(:graph) { { ?a => [?b], ?b => [?a], ?c => [?d, ?b], ?d => [?c] } }
43
+ it { should be true }
44
+ end
45
+
46
+ end
47
+
48
+ describe :feedback_arc_set do
49
+ subject(:result) { described_class.feedback_arc_set(graph) }
50
+
51
+ context "with an empty graph" do
52
+ let(:graph) { { } }
53
+ it { should be_empty }
54
+ end
55
+
56
+ context "with a 1-node acyclic graph" do
57
+ let(:graph) { { ?a => nil } }
58
+ it { should be_empty }
59
+ end
60
+
61
+ context "with a 1-node cyclic graph" do
62
+ let(:graph) { { ?a => [?a] } }
63
+ it { should be == [[?a, ?a]] }
64
+ end
65
+
66
+ context "with a 2-node no-edge graph" do
67
+ let(:graph) { { ?a => nil, ?b => nil } }
68
+ it { should be_empty }
69
+ end
70
+
71
+ context "with a 2-node acyclic graph" do
72
+ let(:graph) { { ?a => [?b], ?b => nil } }
73
+ it { should be_empty }
74
+ end
75
+
76
+ context "with a 2-node cyclic graph" do
77
+ let(:graph) { { ?a => [?b], ?b => [?a] } }
78
+ it { should be == [[?a, ?b]] } # based on the explicit sort
79
+ end
80
+
81
+ context "with a 2-scc graph" do
82
+ let(:graph) { { ?a => [?b], ?b => [?a], ?c => [?d, ?b], ?d => [?c] } }
83
+ it { should be == [[?a, ?b], [?c, ?d]] }
84
+ end
85
+
86
+ end
87
+
88
+ describe :tsort_cyclic do
89
+ subject(:result) { described_class.tsort_cyclic(graph) }
90
+
91
+ context "with an empty graph" do
92
+ let(:graph) { { } }
93
+ it { should be == [] }
94
+ end
95
+
96
+ context "with a 1-node acyclic graph" do
97
+ let(:graph) { { ?a => nil } }
98
+ it { should be == [?a] }
99
+ end
100
+
101
+ context "with a 1-node cyclic graph" do
102
+ let(:graph) { { ?a => [?a] } }
103
+ it { should be == [?a] }
104
+ end
105
+
106
+ context "with a 2-node no-edge graph" do
107
+ let(:graph) { { ?a => nil, ?b => nil } }
108
+ it { should be == [?a, ?b] }
109
+ end
110
+
111
+ context "with a 2-node acyclic graph" do
112
+ let(:graph) { { ?a => [?b], ?b => nil } }
113
+ it { should be == [?b, ?a] } # based on the explicit sort
114
+ end
115
+
116
+ context "with a 2-node cyclic graph" do
117
+ let(:graph) { { ?a => [?b], ?b => [?a] } }
118
+ it { should be == [?a, ?b] } # based on the explicit sort
119
+ end
120
+
121
+ context "with a 2-scc graph" do
122
+ let(:graph) { { ?a => [?b], ?b => [?a], ?c => [?d, ?b], ?d => [?c] } }
123
+ it { should be == [?a, ?b, ?c, ?d] }
124
+ end
125
+
126
+ end
127
+
128
+ end
129
+
130
+ end
131
+ end
@@ -52,19 +52,19 @@ describe Librarian::Config::Database do
52
52
  end
53
53
 
54
54
  it "should have the key globally" do
55
- database.global[key].should == value
55
+ expect(database.global[key]).to eq value
56
56
  end
57
57
 
58
58
  it "should not have the key in the env" do
59
- database.env[key].should be_nil
59
+ expect(database.env[key]).to be_nil
60
60
  end
61
61
 
62
62
  it "should not have the key locally" do
63
- database.local[key].should be_nil
63
+ expect(database.local[key]).to be_nil
64
64
  end
65
65
 
66
66
  it "should have the key generally" do
67
- database[key].should == value
67
+ expect(database[key]).to eq value
68
68
  end
69
69
  end
70
70
 
@@ -78,25 +78,25 @@ describe Librarian::Config::Database do
78
78
  end
79
79
 
80
80
  it "should have the key globally" do
81
- database.global[key].should == value
81
+ expect(database.global[key]).to eq value
82
82
  end
83
83
 
84
84
  it "should not have the key in the env" do
85
- database.env[key].should be_nil
85
+ expect(database.env[key]).to be_nil
86
86
  end
87
87
 
88
88
  it "should not have the key locally" do
89
- database.local[key].should be_nil
89
+ expect(database.local[key]).to be_nil
90
90
  end
91
91
 
92
92
  it "should have the key generally" do
93
- database[key].should == value
93
+ expect(database[key]).to eq value
94
94
  end
95
95
 
96
96
  it "should persist the key" do
97
97
  data = YAML.load_file(global)
98
98
 
99
- data.should == {raw_key => value}
99
+ expect(data).to eq({raw_key => value})
100
100
  end
101
101
  end
102
102
 
@@ -111,23 +111,23 @@ describe Librarian::Config::Database do
111
111
  end
112
112
 
113
113
  it "should not have the key globally" do
114
- database.global[key].should be_nil
114
+ expect(database.global[key]).to be_nil
115
115
  end
116
116
 
117
117
  it "should not have the key in the env" do
118
- database.env[key].should be_nil
118
+ expect(database.env[key]).to be_nil
119
119
  end
120
120
 
121
121
  it "should not have the key locally" do
122
- database.local[key].should be_nil
122
+ expect(database.local[key]).to be_nil
123
123
  end
124
124
 
125
125
  it "should not have the key generally" do
126
- database[key].should be_nil
126
+ expect(database[key]).to be_nil
127
127
  end
128
128
 
129
129
  it "should unpersist the key" do
130
- File.should_not exist global
130
+ expect(File).to_not exist global
131
131
  end
132
132
  end
133
133
 
@@ -140,19 +140,19 @@ describe Librarian::Config::Database do
140
140
  let(:env) { {raw_key => value} }
141
141
 
142
142
  it "should not have the key globally" do
143
- database.global[key].should be_nil
143
+ expect(database.global[key]).to be_nil
144
144
  end
145
145
 
146
146
  it "should have the key in the env" do
147
- database.env[key].should == value
147
+ expect(database.env[key]).to eq value
148
148
  end
149
149
 
150
150
  it "should not have the key locally" do
151
- database.local[key].should be_nil
151
+ expect(database.local[key]).to be_nil
152
152
  end
153
153
 
154
154
  it "should have the key generally" do
155
- database[key].should == value
155
+ expect(database[key]).to eq value
156
156
  end
157
157
  end
158
158
 
@@ -166,19 +166,19 @@ describe Librarian::Config::Database do
166
166
  end
167
167
 
168
168
  it "should not have the key globally" do
169
- database.global[key].should be_nil
169
+ expect(database.global[key]).to be_nil
170
170
  end
171
171
 
172
172
  it "should not have the key in the env" do
173
- database.env[key].should be_nil
173
+ expect(database.env[key]).to be_nil
174
174
  end
175
175
 
176
176
  it "should have the key locally" do
177
- database.local[key].should == value
177
+ expect(database.local[key]).to eq value
178
178
  end
179
179
 
180
180
  it "should have the key generally" do
181
- database[key].should == value
181
+ expect(database[key]).to eq value
182
182
  end
183
183
  end
184
184
 
@@ -192,25 +192,25 @@ describe Librarian::Config::Database do
192
192
  end
193
193
 
194
194
  it "should not have the key globally" do
195
- database.global[key].should be_nil
195
+ expect(database.global[key]).to be_nil
196
196
  end
197
197
 
198
198
  it "should not have the key in the env" do
199
- database.env[key].should be_nil
199
+ expect(database.env[key]).to be_nil
200
200
  end
201
201
 
202
202
  it "should have the key locally" do
203
- database.local[key].should == value
203
+ expect(database.local[key]).to eq value
204
204
  end
205
205
 
206
206
  it "should have the key generally" do
207
- database[key].should == value
207
+ expect(database[key]).to eq value
208
208
  end
209
209
 
210
210
  it "should persist the key" do
211
211
  data = YAML.load_file(local)
212
212
 
213
- data.should == {raw_key => value}
213
+ expect(data).to eq({raw_key => value})
214
214
  end
215
215
  end
216
216
 
@@ -225,23 +225,23 @@ describe Librarian::Config::Database do
225
225
  end
226
226
 
227
227
  it "should not have the key globally" do
228
- database.global[key].should be_nil
228
+ expect(database.global[key]).to be_nil
229
229
  end
230
230
 
231
231
  it "should not have the key in the env" do
232
- database.env[key].should be_nil
232
+ expect(database.env[key]).to be_nil
233
233
  end
234
234
 
235
235
  it "should not have the key locally" do
236
- database.local[key].should be_nil
236
+ expect(database.local[key]).to be_nil
237
237
  end
238
238
 
239
239
  it "should not have the key generally" do
240
- database[key].should be_nil
240
+ expect(database[key]).to be_nil
241
241
  end
242
242
 
243
243
  it "should unpersist the key" do
244
- File.should_not exist local
244
+ expect(File).to_not exist local
245
245
  end
246
246
  end
247
247
 
@@ -272,7 +272,7 @@ describe Librarian::Config::Database do
272
272
  context "project_path" do
273
273
  context "by default" do
274
274
  it "should give the default project path" do
275
- database.project_path.should == Pathname("/tmp")
275
+ expect(database.project_path).to eq Pathname("/tmp")
276
276
  end
277
277
  end
278
278
 
@@ -280,7 +280,7 @@ describe Librarian::Config::Database do
280
280
  let(:env) { {"LIBRARIAN_GEM_GEMFILE" => "/non/sense/path/to/Sillyfile"} }
281
281
 
282
282
  it "should give the project path from the env-set specfile" do
283
- database.project_path.should == Pathname("/non/sense/path/to")
283
+ expect(database.project_path).to eq Pathname("/non/sense/path/to")
284
284
  end
285
285
  end
286
286
  end
@@ -288,7 +288,7 @@ describe Librarian::Config::Database do
288
288
  context "specfile_path" do
289
289
  context "by default" do
290
290
  it "should give the default specfile path" do
291
- database.specfile_path.should == specfile
291
+ expect(database.specfile_path).to eq specfile
292
292
  end
293
293
  end
294
294
 
@@ -296,7 +296,7 @@ describe Librarian::Config::Database do
296
296
  let(:env) { {"LIBRARIAN_GEM_GEMFILE" => "/non/sense/path/to/Sillyfile"} }
297
297
 
298
298
  it "should give the given specfile path" do
299
- database.specfile_path.should == Pathname("/non/sense/path/to/Sillyfile")
299
+ expect(database.specfile_path).to eq Pathname("/non/sense/path/to/Sillyfile")
300
300
  end
301
301
  end
302
302
 
@@ -304,7 +304,7 @@ describe Librarian::Config::Database do
304
304
  let(:project_path) { "/non/sense/path/to" }
305
305
 
306
306
  it "should give the assigned specfile path" do
307
- database.specfile_path.should == Pathname("/non/sense/path/to/Gemfile")
307
+ expect(database.specfile_path).to eq Pathname("/non/sense/path/to/Gemfile")
308
308
  end
309
309
  end
310
310
 
@@ -312,7 +312,7 @@ describe Librarian::Config::Database do
312
312
  let(:specfile_name) { "Sillyfile" }
313
313
 
314
314
  it "should give the assigned specfile path" do
315
- database.specfile_path.should == Pathname("/tmp/Sillyfile")
315
+ expect(database.specfile_path).to eq Pathname("/tmp/Sillyfile")
316
316
  end
317
317
  end
318
318
  end
@@ -0,0 +1,12 @@
1
+ require "librarian/dependency"
2
+
3
+ describe Librarian::Dependency::Requirement do
4
+
5
+ describe "#inspect" do
6
+ subject(:requirement) { described_class.new(">= 3.2.1") }
7
+
8
+ specify { expect(requirement.inspect).
9
+ to eq "#<Librarian::Dependency::Requirement >= 3.2.1>" }
10
+ end
11
+
12
+ end
@@ -26,10 +26,10 @@ module Librarian
26
26
  dep 'dependency-1',
27
27
  :src => 'source-1'
28
28
  end
29
- spec.dependencies.should_not be_empty
30
- spec.dependencies.first.name.should == 'dependency-1'
31
- spec.dependencies.first.source.name.should == 'source-1'
32
- spec.sources.should be_empty
29
+ expect(spec.dependencies).to_not be_empty
30
+ expect(spec.dependencies.first.name).to eq 'dependency-1'
31
+ expect(spec.dependencies.first.source.name).to eq 'source-1'
32
+ expect(spec.sources).to be_empty
33
33
  end
34
34
 
35
35
  it "should run with a shortcut source" do
@@ -37,10 +37,10 @@ module Librarian
37
37
  dep 'dependency-1',
38
38
  :source => :a
39
39
  end
40
- spec.dependencies.should_not be_empty
41
- spec.dependencies.first.name.should == 'dependency-1'
42
- spec.dependencies.first.source.name.should == 'source-a'
43
- spec.sources.should be_empty
40
+ expect(spec.dependencies).to_not be_empty
41
+ expect(spec.dependencies.first.name).to eq 'dependency-1'
42
+ expect(spec.dependencies.first.source.name).to eq 'source-a'
43
+ expect(spec.sources).to be_empty
44
44
  end
45
45
 
46
46
  it "should run with a block hash source" do
@@ -49,10 +49,10 @@ module Librarian
49
49
  dep 'dependency-1'
50
50
  end
51
51
  end
52
- spec.dependencies.should_not be_empty
53
- spec.dependencies.first.name.should == 'dependency-1'
54
- spec.dependencies.first.source.name.should == 'source-1'
55
- spec.sources.should be_empty
52
+ expect(spec.dependencies).to_not be_empty
53
+ expect(spec.dependencies.first.name).to eq 'dependency-1'
54
+ expect(spec.dependencies.first.source.name).to eq 'source-1'
55
+ expect(spec.sources).to be_empty
56
56
  end
57
57
 
58
58
  it "should run with a block named source" do
@@ -61,10 +61,10 @@ module Librarian
61
61
  dep 'dependency-1'
62
62
  end
63
63
  end
64
- spec.dependencies.should_not be_empty
65
- spec.dependencies.first.name.should == 'dependency-1'
66
- spec.dependencies.first.source.name.should == 'source-1'
67
- spec.sources.should be_empty
64
+ expect(spec.dependencies).to_not be_empty
65
+ expect(spec.dependencies.first.name).to eq 'dependency-1'
66
+ expect(spec.dependencies.first.source.name).to eq 'source-1'
67
+ expect(spec.sources).to be_empty
68
68
  end
69
69
 
70
70
  it "should run with a default hash source" do
@@ -72,11 +72,11 @@ module Librarian
72
72
  source :src => 'source-1'
73
73
  dep 'dependency-1'
74
74
  end
75
- spec.dependencies.should_not be_empty
76
- spec.dependencies.first.name.should == 'dependency-1'
77
- spec.dependencies.first.source.name.should == 'source-1'
78
- spec.sources.should_not be_empty
79
- spec.dependencies.first.source.should == spec.sources.first
75
+ expect(spec.dependencies).to_not be_empty
76
+ expect(spec.dependencies.first.name).to eq 'dependency-1'
77
+ expect(spec.dependencies.first.source.name).to eq 'source-1'
78
+ expect(spec.sources).to_not be_empty
79
+ expect(spec.dependencies.first.source).to eq spec.sources.first
80
80
  end
81
81
 
82
82
  it "should run with a default named source" do
@@ -84,11 +84,11 @@ module Librarian
84
84
  src 'source-1'
85
85
  dep 'dependency-1'
86
86
  end
87
- spec.dependencies.should_not be_empty
88
- spec.dependencies.first.name.should == 'dependency-1'
89
- spec.dependencies.first.source.name.should == 'source-1'
90
- spec.sources.should_not be_empty
91
- spec.dependencies.first.source.should == spec.sources.first
87
+ expect(spec.dependencies).to_not be_empty
88
+ expect(spec.dependencies.first.name).to eq 'dependency-1'
89
+ expect(spec.dependencies.first.source.name).to eq 'source-1'
90
+ expect(spec.sources).to_not be_empty
91
+ expect(spec.dependencies.first.source).to eq spec.sources.first
92
92
  end
93
93
 
94
94
  it "should run with a default shortcut source" do
@@ -96,11 +96,11 @@ module Librarian
96
96
  source :a
97
97
  dep 'dependency-1'
98
98
  end
99
- spec.dependencies.should_not be_empty
100
- spec.dependencies.first.name.should == 'dependency-1'
101
- spec.dependencies.first.source.name.should == 'source-a'
102
- spec.sources.should_not be_empty
103
- spec.dependencies.first.source.should == spec.sources.first
99
+ expect(spec.dependencies).to_not be_empty
100
+ expect(spec.dependencies.first.name).to eq 'dependency-1'
101
+ expect(spec.dependencies.first.source.name).to eq 'source-a'
102
+ expect(spec.sources).to_not be_empty
103
+ expect(spec.dependencies.first.source).to eq spec.sources.first
104
104
  end
105
105
 
106
106
  it "should run with a shortcut source hash definition" do
@@ -108,10 +108,10 @@ module Librarian
108
108
  source :b, :src => 'source-b'
109
109
  dep 'dependency-1', :source => :b
110
110
  end
111
- spec.dependencies.should_not be_empty
112
- spec.dependencies.first.name.should == 'dependency-1'
113
- spec.dependencies.first.source.name.should == 'source-b'
114
- spec.sources.should be_empty
111
+ expect(spec.dependencies).to_not be_empty
112
+ expect(spec.dependencies.first.name).to eq 'dependency-1'
113
+ expect(spec.dependencies.first.source.name).to eq 'source-b'
114
+ expect(spec.sources).to be_empty
115
115
  end
116
116
 
117
117
  it "should run with a shortcut source block definition" do
@@ -119,10 +119,10 @@ module Librarian
119
119
  source :b, proc { src 'source-b' }
120
120
  dep 'dependency-1', :source => :b
121
121
  end
122
- spec.dependencies.should_not be_empty
123
- spec.dependencies.first.name.should == 'dependency-1'
124
- spec.dependencies.first.source.name.should == 'source-b'
125
- spec.sources.should be_empty
122
+ expect(spec.dependencies).to_not be_empty
123
+ expect(spec.dependencies.first.name).to eq 'dependency-1'
124
+ expect(spec.dependencies.first.source.name).to eq 'source-b'
125
+ expect(spec.sources).to be_empty
126
126
  end
127
127
 
128
128
  it "should run with a default shortcut source hash definition" do
@@ -131,11 +131,11 @@ module Librarian
131
131
  source :b
132
132
  dep 'dependency-1'
133
133
  end
134
- spec.dependencies.should_not be_empty
135
- spec.dependencies.first.name.should == 'dependency-1'
136
- spec.dependencies.first.source.name.should == 'source-b'
137
- spec.sources.should_not be_empty
138
- spec.sources.first.name.should == 'source-b'
134
+ expect(spec.dependencies).to_not be_empty
135
+ expect(spec.dependencies.first.name).to eq 'dependency-1'
136
+ expect(spec.dependencies.first.source.name).to eq 'source-b'
137
+ expect(spec.sources).to_not be_empty
138
+ expect(spec.sources.first.name).to eq 'source-b'
139
139
  end
140
140
 
141
141
  it "should run with a default shortcut source block definition" do
@@ -144,11 +144,11 @@ module Librarian
144
144
  source :b
145
145
  dep 'dependency-1'
146
146
  end
147
- spec.dependencies.should_not be_empty
148
- spec.dependencies.first.name.should == 'dependency-1'
149
- spec.dependencies.first.source.name.should == 'source-b'
150
- spec.sources.should_not be_empty
151
- spec.sources.first.name.should == 'source-b'
147
+ expect(spec.dependencies).to_not be_empty
148
+ expect(spec.dependencies.first.name).to eq 'dependency-1'
149
+ expect(spec.dependencies.first.source.name).to eq 'source-b'
150
+ expect(spec.sources).to_not be_empty
151
+ expect(spec.sources.first.name).to eq 'source-b'
152
152
  end
153
153
 
154
154
  end