diff --git a/Rakefile b/Rakefile index 2eea1046..b6c5d2c4 100644 --- a/Rakefile +++ b/Rakefile @@ -3,12 +3,9 @@ CUCUMBER_RAILS_VERSION = Gem::Specification.load("#{File.dirname(__FILE__)}/cucumber-rails.gemspec").version.version require 'rubygems' -require 'bundler' -require 'bundler/setup' require 'appraisal' require 'rake/clean' require 'pathname' -Bundler::GemHelper.install_tasks $LOAD_PATH.unshift("#{File.dirname(__FILE__)}/lib") Dir["#{File.dirname(__FILE__)}/dev_tasks/*.rake"].sort.each { |ext| load ext } diff --git a/cucumber-rails.gemspec b/cucumber-rails.gemspec index 5cb6a477..5bcc9ce2 100644 --- a/cucumber-rails.gemspec +++ b/cucumber-rails.gemspec @@ -26,10 +26,9 @@ Gem::Specification.new do |s| s.add_runtime_dependency('railties', '>= 5.2', '< 8') # Main development dependencies - s.add_development_dependency('ammeter', '>= 1.1.4') + s.add_development_dependency('ammeter', '>= 1.1.5') s.add_development_dependency('appraisal', '>= 2.4.1', '< 3') s.add_development_dependency('aruba', '>= 1.1.2', '< 3') - s.add_development_dependency('bundler', '>= 1.17') s.add_development_dependency('database_cleaner', '>= 1.8', '< 3.0') s.add_development_dependency('rails', '>= 5.2', '< 8') s.add_development_dependency('rake', '>= 12.0') @@ -38,7 +37,6 @@ Gem::Specification.new do |s| s.add_development_dependency('rubocop-packaging', '~> 0.5.1') s.add_development_dependency('rubocop-performance', '~> 1.13.3') s.add_development_dependency('rubocop-rspec', '~> 2.10.0') - s.add_development_dependency('sqlite3', '~> 1.3') # For Documentation: s.add_development_dependency('yard', '~> 0.9.10') diff --git a/lib/cucumber/rails/database.rb b/lib/cucumber/rails/database.rb index 85eb8ca4..513b02d0 100644 --- a/lib/cucumber/rails/database.rb +++ b/lib/cucumber/rails/database.rb @@ -1,5 +1,11 @@ # frozen_string_literal: true +require_relative 'database/strategy' +require_relative 'database/deletion_strategy' +require_relative 'database/null_strategy' +require_relative 'database/shared_connection_strategy' +require_relative 'database/truncation_strategy' + module Cucumber module Rails module Database diff --git a/spec/cucumber/rails/database_spec.rb b/spec/cucumber/rails/database_spec.rb index 6a2eb159..970387ff 100644 --- a/spec/cucumber/rails/database_spec.rb +++ b/spec/cucumber/rails/database_spec.rb @@ -1,11 +1,6 @@ # frozen_string_literal: true require 'database_cleaner' -require 'cucumber/rails/database/strategy' -require 'cucumber/rails/database/deletion_strategy' -require 'cucumber/rails/database/null_strategy' -require 'cucumber/rails/database/shared_connection_strategy' -require 'cucumber/rails/database/truncation_strategy' require 'cucumber/rails/database' describe Cucumber::Rails::Database do @@ -29,15 +24,13 @@ it 'raises an error on `before_js` if no DatabaseCleaner cleaners exist' do allow(DatabaseCleaner).to receive(:cleaners).and_return({}) - expect { described_class.before_js } - .to raise_error(/No DatabaseCleaner strategies found/) + expect { described_class.before_js }.to raise_error(/No DatabaseCleaner strategies found/) end end context 'when using an invalid pre-determined strategy' do it 'raises an error if you use a non-understood strategy' do - expect { described_class.javascript_strategy = :invalid } - .to raise_error(Cucumber::Rails::Database::InvalidStrategy) + expect { described_class.javascript_strategy = :invalid }.to raise_error(Cucumber::Rails::Database::InvalidStrategy) end end @@ -73,8 +66,7 @@ def before_non_js let(:invalid_strategy) { Class.new } it 'raises an error if the strategy does not have a valid interface' do - expect { described_class.javascript_strategy = invalid_strategy } - .to raise_error(ArgumentError) + expect { described_class.javascript_strategy = invalid_strategy }.to raise_error(ArgumentError) end end end diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index e9466636..17654f02 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -1,6 +1,5 @@ # frozen_string_literal: true -require 'rspec/rails/fixture_support' require 'rails/all' ActiveRecord::Base.establish_connection adapter: 'sqlite3', database: ':memory:' @@ -12,5 +11,4 @@ class Application < ::Rails::Application end require 'rspec/support/spec' -require 'rspec/rails' require 'ammeter/init'