test/test_helper.rb in roar-rails-1.0.1 vs test/test_helper.rb in roar-rails-1.0.2
- old
+ new
@@ -1,11 +1,11 @@
-require 'minitest/autorun'
-require 'test_xml/mini_test'
-
ENV['RAILS_ENV'] = 'test'
require "dummy/config/environment"
require "rails/test_help" # adds stuff like @routes, etc.
+require 'minitest/rails'
+
+require 'test_xml/mini_test'
require "roar/rails/test_case"
Singer = Struct.new(:name)
# Rails.backtrace_cleaner.remove_silencers!
@@ -15,13 +15,13 @@
# see also https://github.com/jingweno/msgpack_rails/issues/3
::ActionController::Renderers.add :hal do |js, options|
- self.content_type ||= Mime::HAL
+ self.content_type ||= Mime[:hal]
js.is_a?(String) ? js : js.to_json
end
::ActionController::Renderers.add :json_api do |js, options|
- self.content_type ||= Mime::JSONAPI
+ self.content_type ||= Mime[:json_api]
js.is_a?(String) ? js : js.to_json
end