diff options
Diffstat (limited to 'actionpack')
-rw-r--r-- | actionpack/CHANGELOG | 14 | ||||
-rw-r--r-- | actionpack/lib/action_controller/test_process.rb | 8 | ||||
-rw-r--r-- | actionpack/test/controller/test_test.rb | 9 |
3 files changed, 11 insertions, 20 deletions
diff --git a/actionpack/CHANGELOG b/actionpack/CHANGELOG index 12e02ba125..9d215e9d3d 100644 --- a/actionpack/CHANGELOG +++ b/actionpack/CHANGELOG @@ -1,18 +1,6 @@ *SVN* -* Add documentation examples to prototype helper. Closes #7211 [manfred] - -* Enhance documentation coverage for fragment caching. Closes #7315 [bscofield] - -* Fix typo in number helper docs. Closes #7582 [josh] - -* Add many examples to PrototypeHelper documentation. Closes #7656 [jeremymcanally] - -* Add many examples to assertion documentation. Closes #7803 [jeremymcanally] - -* Document the supported options for sortable_element. Closes #8820 [berkelep] - -* Add examples in the documentation for various assertions. Closes #9938 [zapnap] +* Fixed send_file/binary_content for testing #8044 [tolsen] * When a NonInferrableControllerError is raised, make the proposed fix clearer in the error message. Closes #10199 [danger] diff --git a/actionpack/lib/action_controller/test_process.rb b/actionpack/lib/action_controller/test_process.rb index 6e4f9d9ac3..8853311594 100644 --- a/actionpack/lib/action_controller/test_process.rb +++ b/actionpack/lib/action_controller/test_process.rb @@ -270,13 +270,7 @@ module ActionController #:nodoc: require 'stringio' sio = StringIO.new - - begin - $stdout = sio - body.call - ensure - $stdout = STDOUT - end + body.call(self, sio) sio.rewind sio.read diff --git a/actionpack/test/controller/test_test.rb b/actionpack/test/controller/test_test.rb index 9b90d69e95..11e48da91c 100644 --- a/actionpack/test/controller/test_test.rb +++ b/actionpack/test/controller/test_test.rb @@ -73,6 +73,10 @@ XML render :text => params[:file].size end + def test_send_file + send_file(File.expand_path(__FILE__)) + end + def redirect_to_same_controller redirect_to :controller => 'test', :action => 'test_uri', :id => 5 end @@ -542,6 +546,11 @@ XML end end + def test_binary_content_works_with_send_file + get :test_send_file + assert_nothing_raised(NoMethodError) { @response.binary_content } + end + protected def with_foo_routing with_routing do |set| |