Skip to content

Commit

Permalink
chore: update test setup
Browse files Browse the repository at this point in the history
  • Loading branch information
Marten Klitzke committed Jan 9, 2022
1 parent 7bfa66b commit 1e5934d
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 33 deletions.
2 changes: 1 addition & 1 deletion .ruby-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2.6.2
3.0.1
6 changes: 3 additions & 3 deletions dynamic_fields_for_rails.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,15 @@ Gem::Specification.new do |spec|
spec.homepage = 'https://github.com/mortik/dynamic_fields_for_rails'
spec.license = 'MIT'

spec.files = `git ls-files`.split($INPUT_RECORD_SEPARATOR)
spec.files = Dir["{app,config,db,lib}/**/*", "LICENSE.txt", "Rakefile", "README.md"]
spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
spec.require_paths = ['lib']

spec.add_development_dependency 'bundler', '~> 1.3', '> 1.3'
spec.add_development_dependency 'bundler', '~> 2.2', '> 1'
spec.add_development_dependency 'mocha', '~> 1', '> 1'
spec.add_development_dependency 'rake', '~> 13', '> 12'
spec.add_development_dependency 'sqlite3', '~> 1', '> 1'

spec.add_dependency 'rails', '>= 3.0.0', '< 7.0.0'
spec.add_dependency 'rails', '>= 3.0.0', '< 8.0.0'
end
15 changes: 0 additions & 15 deletions test/config/active_record.rb

This file was deleted.

28 changes: 14 additions & 14 deletions test/test_helper.rb
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
# frozen_string_literal: true

require 'rubygems'
require 'bundler/setup'
# Configure Rails Environment
ENV["RAILS_ENV"] = "test"

ENV['RAILS_ENV'] = 'test'
require File.expand_path('dummy/config/environment.rb', __dir__)
require 'rails/test_help'
require 'mocha/setup'
require 'active_support/test_case'
require 'active_support/inflector'
require_relative "../test/dummy/config/environment"
ActiveRecord::Migrator.migrations_paths = [File.expand_path("../test/dummy/db/migrate", __dir__)]
require "rails/test_help"

Rails.backtrace_cleaner.remove_silencers!
require "rails/test_unit/reporter"
Rails::TestUnitReporter.executable = 'bin/test'

ENGINE_RAILS_ROOT = File.join(File.dirname(__FILE__), '../')

# Load support files
Dir[File.join(ENGINE_RAILS_ROOT, 'test/support/**/*.rb')].each { |f| require f }
Dir[File.join(ENGINE_RAILS_ROOT, 'test/config/**/*.rb')].each { |f| require f }
# Load fixtures from the engine
if ActiveSupport::TestCase.respond_to?(:fixture_path=)
ActiveSupport::TestCase.fixture_path = File.expand_path("fixtures", __dir__)
ActionDispatch::IntegrationTest.fixture_path = ActiveSupport::TestCase.fixture_path
ActiveSupport::TestCase.file_fixture_path = ActiveSupport::TestCase.fixture_path + "/files"
ActiveSupport::TestCase.fixtures :all
end

0 comments on commit 1e5934d

Please sign in to comment.