test/test_helper.rb in trust-0.8.3 vs test/test_helper.rb in trust-1.4.2

- old
+ new

@@ -24,13 +24,17 @@ # Configure Rails Environment ENV["RAILS_ENV"] = "test" require File.expand_path("../dummy/config/environment.rb", __FILE__) +ActiveRecord::Migrator.migrations_paths = [File.expand_path("../../test/dummy/db/migrate", __FILE__)] require "rails/test_help" +require 'mocha/mini_test' -Rails.backtrace_cleaner.remove_silencers! +# Filter out Minitest backtrace while allowing backtrace from other libraries +# to be shown. +Minitest.backtrace_filter = Minitest::BacktraceFilter.new # Load support files Dir["#{File.dirname(__FILE__)}/support/**/*.rb"].each { |f| require f } # Load fixtures from the engine @@ -38,8 +42,8 @@ ActiveSupport::TestCase.fixture_path = File.expand_path("../fixtures", __FILE__) end class ActionController::TestCase def login_as(role = :guest) - User.current = @controller.send(:current_user=, User.find_or_create_by_name(role.to_s)) + User.current = @controller.send(:current_user=, User.find_or_create_by(name: role.to_s)) end end \ No newline at end of file