File tree Expand file tree Collapse file tree 6 files changed +30
-5
lines changed
Expand file tree Collapse file tree 6 files changed +30
-5
lines changed Original file line number Diff line number Diff line change @@ -114,8 +114,8 @@ group :development, :test do
114114 gem "faker"
115115 gem "parallel_tests"
116116 gem "rails-erd"
117- gem "rubocop-rails"
118- gem "standard"
117+ gem "rubocop-rails" , require : false
118+ gem "standard" , require : false
119119 gem "webmock"
120120end
121121
@@ -149,6 +149,7 @@ group :test do
149149 gem "rspec-request_snapshot" , github : "tsubik/rspec-request_snapshot" , branch : "fix/ignore-order"
150150 gem "shoulda-matchers" , "~> 4.0.1"
151151 gem "simplecov"
152+ gem "spring-commands-rspec"
152153 gem "super_diff"
153154end
154155
Original file line number Diff line number Diff line change 724724 simplecov_json_formatter (~> 0.1 )
725725 simplecov-html (0.13.1 )
726726 simplecov_json_formatter (0.1.4 )
727+ spring (4.3.0 )
728+ spring-commands-rspec (1.0.4 )
729+ spring (>= 0.9.1 )
727730 sprockets (4.2.2 )
728731 concurrent-ruby (~> 1.0 )
729732 logger
@@ -884,6 +887,7 @@ DEPENDENCIES
884887 shoulda-matchers (~> 4.0.1 )
885888 sidekiq
886889 simplecov
890+ spring-commands-rspec
887891 sprockets-rails
888892 standard
889893 super_diff
Original file line number Diff line number Diff line change 1+ #!/usr/bin/env ruby
2+ load File . expand_path ( "spring" , __dir__ )
3+ require 'bundler/setup'
4+ load Gem . bin_path ( 'rspec-core' , 'rspec' )
Original file line number Diff line number Diff line change 1+ #!/usr/bin/env ruby
2+
3+ # This file loads Spring without loading other gems in the Gemfile in order to be fast.
4+ # It gets overwritten when you run the `spring binstub` command.
5+
6+ if !defined? ( Spring ) && [ nil , "development" , "test" ] . include? ( ENV [ "RAILS_ENV" ] )
7+ require "bundler"
8+
9+ Bundler . locked_gems . specs . find { |spec | spec . name == "spring" } &.tap do |spring |
10+ Gem . use_paths Gem . dir , Bundler . bundle_path . to_s , *Gem . path
11+ gem "spring" , spring . version
12+ require "spring/binstub"
13+ end
14+ end
Original file line number Diff line number Diff line change 99Rails . application . configure do
1010 # Settings specified here will take precedence over those in config/application.rb.
1111
12- # While tests run files are not watched, reloading is not necessary.
13- config . enable_reloading = false
12+ # While tests run files are not watched, reloading is not necessary. (unless you are using Spring)
13+ config . enable_reloading = defined? ( Spring )
1414
1515 # Eager loading loads your entire application. When running a single test locally,
1616 # this is usually not necessary, and can slow down your test suite. However, it's
Original file line number Diff line number Diff line change 2424
2525# TODO: try to remove the line below the comment after some time, not sure why this still not working
2626# see https://github.com/rails/rails/issues/49958
27- RSpec ::Matchers ::AliasedNegatedMatcher . undef_method ( :with )
27+ # somehow this does not work with spring. I have no time to debug this, only one test is failing without this line
28+ # and mostly using spring to run single tests so this is not a problem for me
29+ RSpec ::Matchers ::AliasedNegatedMatcher . undef_method ( :with ) unless defined? ( Spring )
2830RSpec ::Matchers . define_negated_matcher :have_not_enqueued_mail , :have_enqueued_mail
2931
3032# Configuration for Shoulda::Matchers
You can’t perform that action at this time.
0 commit comments