Setup StimulusReflex testing [add gem]

Surprisingly, the StimulusReflex framework [doesn't have many resources for testing](https://docs.stimulusreflex.com/appendices/testing.html), but thankfully someone's made a gem.
This commit is contained in:
David Cook
2023-07-26 12:06:18 +10:00
committed by Jean-Baptiste Bellet
parent e816228959
commit 0f086df12b
4 changed files with 15 additions and 0 deletions

View File

@@ -159,6 +159,7 @@ group :test, :development do
gem 'rspec-retry', require: false
gem 'rswag-specs'
gem 'shoulda-matchers'
gem 'stimulus_reflex_testing'
gem 'timecop'
end

View File

@@ -705,6 +705,8 @@ GEM
rack (>= 2, < 4)
railties (>= 5.2, < 8)
redis (>= 4.0, < 6.0)
stimulus_reflex_testing (0.3.0)
stimulus_reflex (>= 3.3.0)
stringex (2.8.6)
stripe (8.6.0)
swd (1.3.0)
@@ -899,6 +901,7 @@ DEPENDENCIES
spring-commands-rspec
state_machines-activerecord
stimulus_reflex (= 3.5.0.rc3)
stimulus_reflex_testing
stringex (~> 2.8.5)
stripe
timecop

4
spec/reflex_helper.rb Normal file
View File

@@ -0,0 +1,4 @@
# frozen_string_literal: true
require "base_spec_helper"
require "stimulus_reflex_testing/rspec"

View File

@@ -0,0 +1,7 @@
# frozen_string_literal: true
require "reflex_helper"
describe ProductsReflex, type: :reflex do
end