@@ -231,8 +231,7 @@ class InstallInstructionTest < InstanceAgentTestCase
231
231
context "Parsing a delete file" do
232
232
context "an empty delete file" do
233
233
setup do
234
- @parse_string = <<-END
235
- END
234
+ @parse_string = ""
236
235
end
237
236
238
237
should "return an empty command collection" do
@@ -243,9 +242,7 @@ class InstallInstructionTest < InstanceAgentTestCase
243
242
244
243
context "a single file to delete" do
245
244
setup do
246
- @parse_string = <<-END
247
- test_delete_path
248
- END
245
+ @parse_string = "test_delete_path\n "
249
246
File . stubs ( :exist? ) . with ( "test_delete_path" ) . returns ( true )
250
247
end
251
248
@@ -281,10 +278,7 @@ class InstallInstructionTest < InstanceAgentTestCase
281
278
282
279
context "multiple files to delete" do
283
280
setup do
284
- @parse_string = <<-END
285
- test_delete_path
286
- another_delete_path
287
- END
281
+ @parse_string = "test_delete_path\n another_delete_path\n "
288
282
File . stubs ( :directory? ) . returns ( false )
289
283
File . stubs ( :exist? ) . with ( "test_delete_path" ) . returns ( true )
290
284
File . stubs ( :exist? ) . with ( "another_delete_path" ) . returns ( true )
@@ -315,11 +309,7 @@ class InstallInstructionTest < InstanceAgentTestCase
315
309
316
310
context "removes mangled line at the end" do
317
311
setup do
318
- @parse_string = <<-END
319
- test_delete_path
320
- another_delete_path
321
- END
322
- @parse_string << "mangled"
312
+ @parse_string = "test_delete_path\n another_delete_path\n mangled"
323
313
File . stubs ( :exist? ) . with ( "test_delete_path" ) . returns ( true )
324
314
File . stubs ( :exist? ) . with ( "another_delete_path" ) . returns ( true )
325
315
end
@@ -338,7 +328,7 @@ class InstallInstructionTest < InstanceAgentTestCase
338
328
339
329
context "correctly determines method from file type" do
340
330
setup do
341
- @parse_string = ' foo'
331
+ @parse_string = " foo\n "
342
332
@instruction_file = mock
343
333
@instruction_file . stubs ( :path ) . returns ( "test/123-cleanup" )
344
334
File . stubs ( :open ) . with ( "test/123-cleanup" , 'r' ) . returns ( @instruction_file )
0 commit comments