@@ -231,8 +231,7 @@ class InstallInstructionTest < InstanceAgentTestCase
231231 context "Parsing a delete file" do
232232 context "an empty delete file" do
233233 setup do
234- @parse_string = <<-END
235- END
234+ @parse_string = ""
236235 end
237236
238237 should "return an empty command collection" do
@@ -243,9 +242,7 @@ class InstallInstructionTest < InstanceAgentTestCase
243242
244243 context "a single file to delete" do
245244 setup do
246- @parse_string = <<-END
247- test_delete_path
248- END
245+ @parse_string = "test_delete_path\n "
249246 File . stubs ( :exist? ) . with ( "test_delete_path" ) . returns ( true )
250247 end
251248
@@ -281,10 +278,7 @@ class InstallInstructionTest < InstanceAgentTestCase
281278
282279 context "multiple files to delete" do
283280 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 "
288282 File . stubs ( :directory? ) . returns ( false )
289283 File . stubs ( :exist? ) . with ( "test_delete_path" ) . returns ( true )
290284 File . stubs ( :exist? ) . with ( "another_delete_path" ) . returns ( true )
@@ -315,11 +309,7 @@ class InstallInstructionTest < InstanceAgentTestCase
315309
316310 context "removes mangled line at the end" do
317311 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"
323313 File . stubs ( :exist? ) . with ( "test_delete_path" ) . returns ( true )
324314 File . stubs ( :exist? ) . with ( "another_delete_path" ) . returns ( true )
325315 end
@@ -338,7 +328,7 @@ class InstallInstructionTest < InstanceAgentTestCase
338328
339329 context "correctly determines method from file type" do
340330 setup do
341- @parse_string = ' foo'
331+ @parse_string = " foo\n "
342332 @instruction_file = mock
343333 @instruction_file . stubs ( :path ) . returns ( "test/123-cleanup" )
344334 File . stubs ( :open ) . with ( "test/123-cleanup" , 'r' ) . returns ( @instruction_file )
0 commit comments