Last active
August 10, 2023 19:47
-
-
Save DaveSanders/2eefc4de3e085d38fd6901da7dd47712 to your computer and use it in GitHub Desktop.
Revisions
-
DaveSanders revised this gist
Nov 11, 2020 . 1 changed file with 22 additions and 3 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,11 +1,30 @@ ## Scenario I want to use Rspec to build feature specs that test SR pages, just like normal web pages. Therefore, I expect Capybara + Rspec to be able to do things like: ``` visit login_path fill_in 'Email', with: user.email fill_in 'Password', with: user.password + 'BAD' expect(page).to have_content('That email or password is not correct') ``` ## Setup After installing gems, setting up redis, etc. I wrote my first non-SR test, which worked, but outputted the following to the console, cluttering my rspec window: ``` WARNING: Stimulus Reflex requires caching to be enabled. Caching allows the session to be modified during ActionCable requests. To enable caching in development, run: rails dev:cache ``` To fix, I edited two lines in test.rb: ``` config.action_controller.perform_caching = true config.cache_store = :memory_store ``` Which made the error go away and let me run my spec. -
DaveSanders created this gist
Nov 11, 2020 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,11 @@ Scenario: I want to use Rspec to build feature specs that test SR pages, just like normal web pages Therefore, I expect Capybara + Rspec to be able to do things like: visit login_path fill_in 'Email', with: user.email fill_in 'Password', with: user.password + 'BAD' expect(page).to have_content('That email or password is not correct')