File tree Expand file tree Collapse file tree 1 file changed +17
-13
lines changed
Expand file tree Collapse file tree 1 file changed +17
-13
lines changed Original file line number Diff line number Diff line change @@ -151,29 +151,33 @@ def initialize(fixture_path)
151151 end
152152
153153 it 'ignores nested optional dependencies' do
154- expect ( @resolver . resolve ( [ weak_dep ] , DependencyGraph . new ) . map ( &:payload ) . compact . map ( &:to_s ) ) . to eq [
155- 'weak_dep (1.0.0)' ,
156- 'no_deps (1.0.0)' ,
157- ]
154+ expect ( @resolver . resolve ( [ weak_dep ] , DependencyGraph . new ) . map ( &:payload ) . compact . map ( &:to_s ) ) .
155+ to contain_exactly (
156+ 'weak_dep (1.0.0)' ,
157+ 'no_deps (1.0.0)'
158+ )
158159 end
159160
160161 it 'uses nested optional dependencies' do
161162 expect ( @resolver . resolve ( [ weak_dep , strong_dep ] , DependencyGraph . new ) . map ( &:payload ) . compact . map ( &:to_s ) ) .
162- to eq [
163+ to contain_exactly (
163164 'weak_dep (1.0.0)' ,
164165 'strong_dep (1.0.0)' ,
165- 'no_deps (1.0.0)' ,
166- ]
166+ 'no_deps (1.0.0)'
167+ )
167168 end
168169
169170 it 'raises when an optional dependency conflicts' do
170171 resolve = proc { @resolver . resolve ( [ weak_dep , no_deps ] , DependencyGraph . new ) }
171- expect ( &resolve ) . to raise_error ( Molinillo ::VersionConflict , <<-EOS . strip )
172- Unable to satisfy the following requirements:
173-
174- - `no_deps (> 1.0.0)` required by `user-specified dependency`
175- - `no_deps (< 2.0.0)` required by `weak_dep (1.0.0)`
176- EOS
172+ error = proc do |e |
173+ expect ( e . message . split ( "\n " ) ) . to contain_exactly (
174+ 'Unable to satisfy the following requirements:' ,
175+ '' ,
176+ '- `no_deps (> 1.0.0)` required by `user-specified dependency`' ,
177+ '- `no_deps (< 2.0.0)` required by `weak_dep (1.0.0)`'
178+ )
179+ end
180+ expect ( &resolve ) . to raise_error ( Molinillo ::VersionConflict , &error )
177181 end
178182 end
179183
You can’t perform that action at this time.
0 commit comments