test/integration_tests/mycook_spec.rb in passenger-2.2.2 vs test/integration_tests/mycook_spec.rb in passenger-2.2.3
- old
+ new
@@ -122,12 +122,11 @@
render :text => "foo"
end
end
}
end
- File.open(restart_file, 'w').close
- File.utime(now - 10, now - 10, restart_file)
+ File.touch(restart_file, now - 10)
get('/test').should == "foo"
File.open(controller, 'w') do |f|
f.write %q{
class TestController < ApplicationController
@@ -137,11 +136,11 @@
end
end
}
end
- File.utime(now - 5, now - 5, restart_file)
+ File.touch(restart_file, now - 5)
get('/test').should == 'bar'
ensure
File.unlink(controller) rescue nil
File.unlink(restart_file) rescue nil
end
@@ -163,10 +162,10 @@
end
end
})
end
begin
- system "touch '#{@stub.app_root}/tmp/restart.txt'"
+ File.touch("#{@stub.app_root}/tmp/restart.txt")
get('/welcome/passenger_name').should == 'Gourry Gabriev'
ensure
File.unlink("#{@stub.app_root}/app/models/passenger.rb") rescue nil
end
end