File tree Expand file tree Collapse file tree 1 file changed +35
-0
lines changed
spec/octocatalog-diff/tests/catalog-util Expand file tree Collapse file tree 1 file changed +35
-0
lines changed Original file line number Diff line number Diff line change 157
157
end
158
158
end
159
159
end
160
+ context 'with --environment' do
161
+ context 'with logger' do
162
+ it 'should install a symlink to the given environment' do
163
+ logger = double ( 'Logger' )
164
+
165
+ @described_object . instance_variable_set (
166
+ '@options' ,
167
+ basedir : '/tmp/basedir' ,
168
+ environment : 'baz'
169
+ )
170
+
171
+ expect ( @described_object )
172
+ . to receive ( :install_directory_symlink )
173
+ . with ( logger , '/tmp/basedir' , 'environments/baz' )
174
+
175
+ expect { @described_object . send ( :create_symlinks , logger ) } . not_to raise_error
176
+ end
177
+ end
178
+
179
+ context 'without logger' do
180
+ it 'should install default symlink' do
181
+ @described_object . instance_variable_set (
182
+ '@options' ,
183
+ basedir : '/tmp/basedir' ,
184
+ environment : 'baz'
185
+ )
186
+
187
+ expect ( @described_object )
188
+ . to receive ( :install_directory_symlink )
189
+ . with ( nil , '/tmp/basedir' , 'environments/baz' )
190
+
191
+ expect { @described_object . send ( :create_symlinks ) } . not_to raise_error
192
+ end
193
+ end
194
+ end
160
195
161
196
context 'without --create-symlinks or --environment' do
162
197
it 'should install directory symlink' do
You can’t perform that action at this time.
0 commit comments