Guest User

Untitled

a guest
Jun 19th, 2018
103
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.58 KB | None | 0 0
  1. require 'test_helper'
  2.  
  3. class PosterControllerTest < ActionController::TestCase
  4.  
  5. def test_putting_an_image
  6. @request.env['CONTENT_TYPE'] = "image/bmp"
  7. #@request.env['RAW_POST_BODY'] = "asdfasdf" # normally load data from a file
  8. put :put
  9. end
  10. end
  11.  
  12.  
  13. running this with Jruby 1.3RC2 gets me this:
  14. test_putting_an_image(PosterControllerTest):
  15. NoMethodError: undefined method `split' for #<Mime::Type:0x48ce88f6>
  16. test/functional/poster_controller_test.rb:7:in `test_putting_an_image'
  17.  
  18. 1 tests, 0 assertions, 0 failures, 1 errors
  19.  
  20. with regular ruby it passes
Add Comment
Please, Sign In to add comment