diff --git a/app/models/application_record.rb b/app/models/application_record.rb index 10a4cba..141a300 100644 --- a/app/models/application_record.rb +++ b/app/models/application_record.rb @@ -1,3 +1,7 @@ class ApplicationRecord < ActiveRecord::Base self.abstract_class = true + + def to_i + id + end end diff --git a/test/test_helper.rb b/test/test_helper.rb index 92e39b2..6c33b16 100644 --- a/test/test_helper.rb +++ b/test/test_helper.rb @@ -1,8 +1,15 @@ ENV['RAILS_ENV'] ||= 'test' +# require 'single_cov' +# SingleCov.setup :minitest require File.expand_path('../../config/environment', __FILE__) require 'rails/test_help' +require "minitest/autorun" +require 'minitest/reporters' +Minitest::Reporters.use! [Minitest::Reporters::DefaultReporter.new(color: true)] class ActiveSupport::TestCase + ActiveRecord::Migration.check_pending! + # Setup all fixtures in test/fixtures/*.yml for all tests in alphabetical order. fixtures :all