diff --git a/lib/paper_trail.rb b/lib/paper_trail.rb index ec933d4b..8a2b5462 100644 --- a/lib/paper_trail.rb +++ b/lib/paper_trail.rb @@ -103,10 +103,10 @@ end # Ensure `ProtectedAttributes` gem gets required if it is available before the `Version` class gets loaded in unless PaperTrail.active_record_protected_attributes? - PaperTrail.remove_instance_variable(:@active_record_protected_attributes) + PaperTrail.send(:remove_instance_variable, :@active_record_protected_attributes) begin require 'protected_attributes' - rescue LoadError; end # will rescue if ProtectedAttributes gem is not available + rescue LoadError; end # will rescue if `ProtectedAttributes` gem is not available end require 'paper_trail/version' diff --git a/test/test_helper.rb b/test/test_helper.rb index c37590bb..3a5357c2 100644 --- a/test/test_helper.rb +++ b/test/test_helper.rb @@ -3,16 +3,11 @@ ENV["RAILS_ENV"] = "test" require File.expand_path("../dummy/config/environment.rb", __FILE__) require "rails/test_help" - -#ActionMailer::Base.delivery_method = :test -#ActionMailer::Base.perform_deliveries = true -#ActionMailer::Base.default_url_options[:host] = "test.com" - -Rails.backtrace_cleaner.remove_silencers! - require 'shoulda' require 'ffaker' +Rails.backtrace_cleaner.remove_silencers! + # Run any available migration ActiveRecord::Migrator.migrate File.expand_path("../dummy/db/migrate/", __FILE__)