Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #
- # Macro that creates a test asserting that the controller sends the
- # content type given.
- # Example:
- #
- # should_send_content_type :pdf
- # should_send_content_type :csv
- def should_send_content_type(content_type)
- should "send content type #{content_type}" do
- assert_equal Mime::Type.lookup_by_extension(content_type.to_s).to_s,
- @response.content_type
- end
- end
Add Comment
Please, Sign In to add comment