From 438e53c295f03285a5a9d203ac990f51fafd7011 Mon Sep 17 00:00:00 2001 From: Damian Janowski Date: Thu, 22 Apr 2010 19:09:45 -0300 Subject: [PATCH] Fix broken integration test in 1.9.1-p378. --- spec/integration/rack/app.rb | 3 ++- spec/integration/rack/test/webrat_rack_test.rb | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/spec/integration/rack/app.rb b/spec/integration/rack/app.rb index 24d3a4f..bbd18b5 100644 --- a/spec/integration/rack/app.rb +++ b/spec/integration/rack/app.rb @@ -38,7 +38,8 @@ class RackApp < Sinatra::Base end post "/upload" do - params[:uploaded_file].to_yaml + uploaded_file = params[:uploaded_file] + Marshal.dump(:tempfile => uploaded_file[:tempfile].read, :type => uploaded_file[:type], :filename => uploaded_file[:filename]) end end diff --git a/spec/integration/rack/test/webrat_rack_test.rb b/spec/integration/rack/test/webrat_rack_test.rb index b49688f..1f0991d 100644 --- a/spec/integration/rack/test/webrat_rack_test.rb +++ b/spec/integration/rack/test/webrat_rack_test.rb @@ -53,10 +53,10 @@ class WebratRackTest < Test::Unit::TestCase attach_file "File", __FILE__, "text/ruby" click_button "Upload" - upload = YAML.load(response_body) + upload = Marshal.load(response_body) assert_equal "text/ruby", upload[:type] assert_equal "webrat_rack_test.rb", upload[:filename] - assert upload[:tempfile].respond_to?(:read) + assert_equal File.read(__FILE__), upload[:tempfile] end end