Why Capypara + Rspect tests still pass even though I delete application.js file?
Try with
rake assets:clobber
This will remove compiled assets and clean them.
Rails 5 Capybara Test Routing Error public/assets
I changed this confid in test.rb
and worked:
config.assets.prefix = '../public/assets/'
to
config.assets.prefix = ''
Rspec/capybara requests failing to see page content
Today (over a month later) I realized what was causing the problem- an incorrect HTML comment. When I experiment with things, I usually comment out the experiments instead of deleting them, so it was bound to happen again, but this time it was easier to spot.
Correct comment:
<!-- commented-out HTML -->
Incorrect comment:
<!-- commented-out HTML --!>
That second !
at the end of the incorrect comment was causing the comment to not be closed properly. My text editor didn't care, and my browser seemed to be rendering everything the same, but in my case, capybara wasn't reading past it.
Kind of embarrassing, but at least I know now.
Related Topics
Rails Syntax Error: Unexpected Keyword_Ensure, Expecting Keyword_End
Ruby on Windows7 - Could Not Find Gem
Why Do I Get "Undefined Method 'Paginate'" Error in Production
Why Non-Explicit Splat Param Plus Default Param Is Wrong Syntax for Method Definition in Ruby 1.9
Getting Rails to Accept European Date Format (Dd/Mm/Yyyy)
Ternary Expression with "Defined" Returns "Expression" Instead of Value
Exclude Some Ids from Result in Rails Activerecord
Regex to Match Mm/Dd/Yyyy Hh:Mm:Ss Am or Pm
Any Ruby Library to Inspect What Are the Arguments That a Certain Methods Take
Why Is Heroku's Heroku-18 Stack Only Compatible with Puma Versions 3.7.X
Bundler How to Uninstall Conflicting Dependency
Actionmailer Smtp "Certificate Verify Failed"
Rails: Merit Gem Badge Not Registering or Displaying