From 3fb6ccc67c0913e2b51c120fe0709748e480d3a2 Mon Sep 17 00:00:00 2001 From: Artur Beljajev Date: Thu, 3 Oct 2019 15:15:34 +0300 Subject: [PATCH] Remove `rspec-rails` gem --- .codeclimate.yml | 1 - .travis.yml | 1 - Gemfile | 1 - Gemfile.lock | 9 ----- bin/rspec | 16 --------- config/application.rb | 3 -- spec/rails_helper.rb | 64 ------------------------------------ spec/spec_helper.rb | 76 ------------------------------------------- 8 files changed, 171 deletions(-) delete mode 100755 bin/rspec delete mode 100644 spec/rails_helper.rb delete mode 100644 spec/spec_helper.rb diff --git a/.codeclimate.yml b/.codeclimate.yml index ec9b25820..5a9b41ea7 100644 --- a/.codeclimate.yml +++ b/.codeclimate.yml @@ -38,7 +38,6 @@ exclude_patterns: - "lib/tasks/import.rake" - "lib/tasks/legal_doc.rake" - "lib/tasks/whois.rake" - - "spec/" - "test/" - "vendor/" - "CHANGELOG.md" diff --git a/.travis.yml b/.travis.yml index 60b453f63..460122e12 100644 --- a/.travis.yml +++ b/.travis.yml @@ -23,7 +23,6 @@ before_script: - "chmod +x ./cc-test-reporter" - "./cc-test-reporter before-build" script: - - "bundle exec rspec" - "bundle exec rake test" after_script: - "./cc-test-reporter after-build --exit-code $TRAVIS_TEST_RESULT" diff --git a/Gemfile b/Gemfile index 3e4d79449..d855cb751 100644 --- a/Gemfile +++ b/Gemfile @@ -90,7 +90,6 @@ end group :development, :test do gem 'capybara' - gem 'rspec-rails', '~> 3.6' gem 'selenium-webdriver' # debug diff --git a/Gemfile.lock b/Gemfile.lock index aaae2e0f7..8673577c9 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -336,14 +336,6 @@ GEM rspec-mocks (3.6.0) diff-lcs (>= 1.2.0, < 2.0) rspec-support (~> 3.6.0) - rspec-rails (3.6.0) - actionpack (>= 3.0) - activesupport (>= 3.0) - railties (>= 3.0) - rspec-core (~> 3.6.0) - rspec-expectations (~> 3.6.0) - rspec-mocks (~> 3.6.0) - rspec-support (~> 3.6.0) rspec-support (3.6.0) rubyzip (1.2.2) safe_yaml (1.0.5) @@ -477,7 +469,6 @@ DEPENDENCIES rails-settings-cached (= 0.7.2) ransack (= 1.5.1) rest-client - rspec-rails (~> 3.6) sass-rails (= 5.0.6) sdoc (= 0.4.1) select2-rails (= 3.5.9.3) diff --git a/bin/rspec b/bin/rspec deleted file mode 100755 index 8bc84617e..000000000 --- a/bin/rspec +++ /dev/null @@ -1,16 +0,0 @@ -#!/usr/bin/env ruby -# -# This file was generated by Bundler. -# -# The application 'rspec' is installed as part of a gem, and -# this file is here to facilitate running it. -# - -require 'pathname' -ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../Gemfile', - Pathname.new(__FILE__).realpath) - -require 'rubygems' -require 'bundler/setup' - -load Gem.bin_path('rspec-core', 'rspec') diff --git a/config/application.rb b/config/application.rb index 3c747b4b3..d02c6e9d0 100644 --- a/config/application.rb +++ b/config/application.rb @@ -76,9 +76,6 @@ module DomainNameRegistry config.action_mailer.perform_deliveries = true config.action_mailer.raise_delivery_errors = true - # Override "spec/mailers/previews" that RSpec sets - config.action_mailer.preview_path = "#{Rails.root}/test/mailers/previews" - config.action_mailer.smtp_settings = { address: ENV['smtp_address'], port: ENV['smtp_port'], diff --git a/spec/rails_helper.rb b/spec/rails_helper.rb deleted file mode 100644 index 85a9832e9..000000000 --- a/spec/rails_helper.rb +++ /dev/null @@ -1,64 +0,0 @@ -ENV['RAILS_ENV'] ||= 'test' -require 'spec_helper' -require File.expand_path('../../config/environment', __FILE__) -require 'rspec/rails' -require 'paper_trail/frameworks/rspec' -require 'money-rails/test_helpers' -require 'support/requests/session_helpers' -require 'support/requests/epp_helpers' -require 'support/features/session_helpers' -require 'support/matchers/alias_attribute' - -require 'support/capybara' -require 'support/devise' -require 'support/factory_bot' -require 'support/database_cleaner' -require 'support/paper_trail' -require 'support/settings' - -ActiveRecord::Migration.maintain_test_schema! -Setting.registry_country_code = 'US' - -RSpec.configure do |config| - config.include ActionView::TestCase::Behavior, type: :presenter - config.include ActiveSupport::Testing::TimeHelpers - config.include Requests::SessionHelpers, type: :request - config.include Features::SessionHelpers, type: :feature - config.include AbstractController::Translation, type: :request - config.include AbstractController::Translation, type: :feature - config.include AbstractController::Translation, type: :mailer - config.include Requests::EPPHelpers, epp: true - config.include Devise::Test::IntegrationHelpers, type: :feature - config.include Devise::Test::IntegrationHelpers, type: :request - - config.define_derived_metadata(file_path: %r[/spec/features/]) do |metadata| - metadata[:db] = true if metadata[:db].nil? - end - - config.define_derived_metadata(file_path: %r[/spec/models/]) do |metadata| - metadata[:db] = true if metadata[:db].nil? - end - - config.define_derived_metadata(file_path: %r[/spec/presenters/]) do |metadata| - metadata[:type] = :presenter - end - - config.define_derived_metadata(file_path: %r[/spec/requests/]) do |metadata| - metadata[:db] = true if metadata[:db].nil? - end - - config.define_derived_metadata(file_path: %r[/spec/requests/epp/]) do |metadata| - metadata[:epp] = true if metadata[:epp].nil? - end - - config.define_derived_metadata(file_path: %r[/spec/api/]) do |metadata| - metadata[:type] = :request - end - - config.use_transactional_fixtures = false - config.infer_spec_type_from_file_location! - - config.expect_with :rspec do |c| - c.syntax = [:should, :expect] - end -end diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb deleted file mode 100644 index f10463346..000000000 --- a/spec/spec_helper.rb +++ /dev/null @@ -1,76 +0,0 @@ -if ENV['COVERAGE'] - require 'simplecov' - SimpleCov.command_name 'spec' -end - -require 'webmock/rspec' -WebMock.disable_net_connect!(allow_localhost: true) - -RSpec.configure do |config| - # rspec-expectations config goes here. You can use an alternate - # assertion/expectation library such as wrong or the stdlib/minitest - # assertions if you prefer. - config.expect_with :rspec do |expectations| - # This option will default to `true` in RSpec 4. It makes the `description` - # and `failure_message` of custom matchers include text for helper methods - # defined using `chain`, e.g.: - # be_bigger_than(2).and_smaller_than(4).description - # # => "be bigger than 2 and smaller than 4" - # ...rather than: - # # => "be bigger than 2" - expectations.include_chain_clauses_in_custom_matcher_descriptions = true - end - - config.mock_with :rspec do |mocks| - mocks.verify_partial_doubles = true - end - - # The settings below are suggested to provide a good initial experience - # with RSpec, but feel free to customize to your heart's content. -=begin - # These two settings work together to allow you to limit a spec run - # to individual examples or groups you care about by tagging them with - # `:focus` metadata. When nothing is tagged with `:focus`, all examples - # get run. - config.filter_run :focus - config.run_all_when_everything_filtered = true - - # Limits the available syntax to the non-monkey patched syntax that is recommended. - # For more details, see: - # - http://myronmars.to/n/dev-blog/2012/06/rspecs-new-expectation-syntax - # - http://teaisaweso.me/blog/2013/05/27/rspecs-new-message-expectation-syntax/ - # - http://myronmars.to/n/dev-blog/2014/05/notable-changes-in-rspec-3#new__config_option_to_disable_rspeccore_monkey_patching - config.disable_monkey_patching! - - # This setting enables warnings. It's recommended, but in some cases may - # be too noisy due to issues in dependencies. - config.warnings = true - - # Many RSpec users commonly either run the entire suite or an individual - # file, and it's useful to allow more verbose output when running an - # individual spec file. - if config.files_to_run.one? - # Use the documentation formatter for detailed output, - # unless a formatter has already been configured - # (e.g. via a command-line flag). - config.default_formatter = 'doc' - end - - # Print the 10 slowest examples and example groups at the - # end of the spec run, to help surface which specs are running - # particularly slow. - config.profile_examples = 10 - - # Run specs in random order to surface order dependencies. If you find an - # order dependency and want to debug it, you can fix the order by providing - # the seed, which is printed after each run. - # --seed 1234 - config.order = :random - - # Seed global randomization in this process using the `--seed` CLI option. - # Setting this allows you to use `--seed` to deterministically reproduce - # test failures related to randomization by passing the same `--seed` value - # as the one that triggered the failure. - Kernel.srand config.seed -=end -end