diff --git a/Gemfile b/Gemfile index ad4e6c82a46..8c1cc92db0a 100644 --- a/Gemfile +++ b/Gemfile @@ -87,7 +87,6 @@ gem 'zxcvbn', '0.1.9' group :development do gem 'better_errors', '>= 2.5.1' gem 'derailed_benchmarks' - gem 'guard-rspec', require: false gem 'irb' gem 'letter_opener', '~> 1.8' gem 'rack-mini-profiler', '>= 1.1.3', require: false @@ -107,6 +106,7 @@ group :development, :test do gem 'pry-doc' gem 'pry-rails' gem 'psych' + gem 'rspec', '~> 3.12.0' gem 'rspec-rails', '~> 6.0' gem 'rubocop', '~> 1.55.1', require: false gem 'rubocop-performance', '~> 1.18.0', require: false diff --git a/Gemfile.lock b/Gemfile.lock index 1484570a723..501904fdc06 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -299,7 +299,6 @@ GEM ffi-compiler (1.0.1) ffi (>= 1.0.0) rake - formatador (0.2.5) foundation_emails (2.2.1.0) fugit (1.8.1) et-orbi (~> 1, >= 1.2.7) @@ -318,20 +317,6 @@ GEM thor (>= 0.14.1) webrick (>= 1.3) google-protobuf (3.24.0) - guard (2.16.2) - formatador (>= 0.2.4) - listen (>= 2.7, < 4.0) - lumberjack (>= 1.0.12, < 2.0) - nenv (~> 0.1) - notiffany (~> 0.0) - pry (>= 0.9.12) - shellany (~> 0.0) - thor (>= 0.18.1) - guard-compat (1.2.1) - guard-rspec (4.7.3) - guard (~> 2.1) - guard-compat (~> 1.1) - rspec (>= 2.99.0, < 4.0) hashdiff (1.0.1) hashie (4.1.0) heapy (0.2.0) @@ -394,7 +379,6 @@ GEM yard (~> 0.9.25) zeitwerk (~> 2.5) lru_redux (1.1.0) - lumberjack (1.2.9) mail (2.8.1) mini_mime (>= 0.1.1) net-imap @@ -411,7 +395,6 @@ GEM minitest (5.19.0) msgpack (1.7.2) multiset (0.5.3) - nenv (0.3.0) net-imap (0.3.7) date net-protocol @@ -429,9 +412,6 @@ GEM nokogiri (1.14.5) mini_portile2 (~> 2.8.0) racc (~> 1.4) - notiffany (0.1.3) - nenv (~> 0.1) - shellany (~> 0.0) openssl (3.0.2) openssl-signature_algorithm (1.2.1) openssl (> 2.0, < 3.1) @@ -630,7 +610,6 @@ GEM rexml (~> 3.2, >= 3.2.5) rubyzip (>= 1.2.2, < 3.0) websocket (~> 1.0) - shellany (0.0.1) shoulda-matchers (4.5.1) activesupport (>= 4.2.0) simple_form (5.1.0) @@ -756,7 +735,6 @@ DEPENDENCIES faraday-retry foundation_emails good_job (~> 3.0) - guard-rspec hashie (~> 4.1) http_accept_language i18n-tasks (~> 1.0) @@ -807,6 +785,7 @@ DEPENDENCIES retries rotp (~> 6.1) rqrcode + rspec (~> 3.12.0) rspec-rails (~> 6.0) rspec-retry rspec_junit_formatter diff --git a/Guardfile b/Guardfile deleted file mode 100644 index 8586edb9f26..00000000000 --- a/Guardfile +++ /dev/null @@ -1,63 +0,0 @@ -# A sample Guardfile -# More info at https://github.com/guard/guard#readme - -## Uncomment and set this to only include directories you want to watch -# directories %w(app lib config test spec features) \ -# .select{|d| Dir.exists?(d) ? d : UI.warning("Directory #{d} does not exist")} - -## Note: if you are using the `directories` clause above and you are not -## watching the project directory ('.'), then you will want to move -## the Guardfile to a watched dir and symlink it back, e.g. -# -# $ mkdir config -# $ mv Guardfile config/ -# $ ln -s config/Guardfile . -# -# and, you'll have to watch "config/Guardfile" instead of "Guardfile" - -# Note: The cmd option is now required due to the increasing number of ways -# rspec may be run, below are examples of the most common uses. -# * bundler: 'bundle exec rspec' -# * bundler binstubs: 'bin/rspec' -# * spring: 'bin/rspec' (This will use spring if running and you have -# installed the spring binstubs per the docs) -# * zeus: 'zeus rspec' (requires the server to be started separately) -# * 'just' rspec: 'rspec' -guard :rspec, cmd: ENV['GUARD_RSPEC_CMD'] || 'bundle exec rspec' do - require 'guard/rspec/dsl' - dsl = Guard::RSpec::Dsl.new(self) - - # Feel free to open issues for suggestions and improvements - - # RSpec files - rspec = dsl.rspec - watch(rspec.spec_helper) { rspec.spec_dir } - watch(rspec.spec_support) { rspec.spec_dir } - watch(rspec.spec_files) - - # Ruby files - ruby = dsl.ruby - dsl.watch_spec_files_for(ruby.lib_files) - - # Rails files - rails = dsl.rails(view_extensions: %w[erb]) - dsl.watch_spec_files_for(rails.app_files) - dsl.watch_spec_files_for(rails.views) - - watch(rails.controllers) do |m| - [ - rspec.spec.call("routing/#{m[1]}_routing"), - rspec.spec.call("controllers/#{m[1]}_controller"), - rspec.spec.call("acceptance/#{m[1]}"), - ] - end - - # Rails config changes - watch(rails.spec_helper) { rspec.spec_dir } - watch(rails.routes) { "#{rspec.spec_dir}/routing" } - watch(rails.app_controller) { "#{rspec.spec_dir}/controllers" } - - # Capybara features specs - watch(rails.view_dirs) { |m| rspec.spec.call("features/#{m[1]}") } - watch(rails.layouts) { |m| rspec.spec.call("features/#{m[1]}") } -end diff --git a/docs/local-development.md b/docs/local-development.md index 7ad1eced699..86051607d6b 100644 --- a/docs/local-development.md +++ b/docs/local-development.md @@ -61,7 +61,6 @@ If not using macOS: Login.gov uses the following tools for our testing: - [RSpec](https://relishapp.com/rspec/rspec-core/docs/command-line) - - [Guard](https://github.com/guard/guard-rspec) - [Mocha documentation](https://mochajs.org/) To run our full test suite locally, use the following command: @@ -92,24 +91,6 @@ If not using macOS: $ SHOW_BROWSER=true bundle exec rspec spec/features/ ``` -### Speeding up local development and testing - - To automatically run the test that corresponds to the file you are editing, - run `bundle exec guard` with the env var `GUARD_RSPEC_CMD` set to your preferred - command for running `rspec`. For example, if you use [Zeus](https://github.com/burke/zeus), - you would set the env var to `zeus rspec`: - ```console - GUARD_RSPEC_CMD="zeus rspec" bundle exec guard - ``` - - If you don't specify the `GUARD_RSPEC_CMD` env var, it will default to - `bundle exec rspec`. - - We also recommend setting up a shell alias for running this command, such as: - ```console - alias idpguard='GUARD_RSPEC_CMD="zeus rspec" bundle exec guard' - ``` - ### Viewing email messages In local development, the application does not deliver real email messages. Instead, we use a tool