Commit Graph

16 Commits

Author SHA1 Message Date
Ken Johnson 5d698c8003 Fix RSpec 3 compatibility: Replace pending with skip
Updated vulnerability specs to use `skip` instead of `pending` to align
with RSpec 3+ semantics where pending means "expected to fail."

Background:
In RSpec 2, `pending` would skip tests. In RSpec 3+, `pending` marks
a test as expected to fail, and if it passes, that's an error. This was
causing issues in maintainer mode where passing tests were incorrectly
flagged as failures.

Changes:
- Replaced `pending unless verifying_fixed?` with `skip unless verifying_fixed?`
  in 11 vulnerability spec files:
  - broken_auth_spec.rb
  - command_injection_spec.rb
  - csrf_spec.rb
  - insecure_dor_spec.rb
  - mass_assignment_spec.rb
  - password_complexity_spec.rb
  - sensitive_data_exposure.rb
  - sql_injection_spec.rb
  - unvalidated_redirects_spec.rb
  - url_access_spec.rb
  - xss_spec.rb

Impact:
- Maintainer mode: Tests are properly skipped (no false failures)
- Training mode: Tests run and demonstrate vulnerabilities as before
- All tests pass with 0 failures in maintainer mode

Reference: https://rspec.info/blog/2014/05/notable-changes-in-rspec-3

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2026-01-05 20:14:08 -05:00
Al Snow 23d145129d Upgraded Ruby to 2.7.0-preview1 and Rails to 6.0.0 - fixed 1 spec 2019-09-09 15:13:29 -04:00
cktricky 00af8293b2 changed user_id to id 2017-12-19 08:26:02 -05:00
Joseph Mastey 5643edcc5d refactor vulnerabilities so that users can turn them from failing to passing 2017-12-13 08:33:50 -06:00
Joseph Mastey fb2254342e Changes tests to invert the logic, so that users can turn tests from red to green 2017-12-13 08:21:52 -06:00
Joseph Mastey bb863f5156 appease our new robot overlords.
(I voted for Krang)
2017-12-12 21:00:45 -06:00
Joseph Mastey b6c2259b88 removes user_id column from User model to use idiomatic Rails automatic IDs 2017-12-12 15:19:22 -06:00
Joseph Mastey 9902345291 chore(rubocop): giganto rubocop commit.
muahahahah
2017-12-05 18:46:21 -06:00
cktricky f5cfec3bf4 Merge branch 'add-test-case-for-a1-field-injection' of https://github.com/jmmastey/railsgoat into jmmastey-add-test-case-for-a1-field-injection 2017-10-02 19:06:11 -04:00
Joseph Mastey 9fc05eacde feat(vulnerabilities): adds description of vulnerability for sql interpolation
also fixes several small errors on that page, otherwise JS raises errors.

fixes #181
2017-09-18 19:50:23 -05:00
Joseph Mastey b934194ffe bug(passwords): fix situations where better password rules inadvertently break tests
* use bang version of save methods in the seeds file, so that when you fix validation,
  it will at least explode, rather than silently failing to create users
* fix two tests where passwords are hardcoded so that they use stronger passwords,
  since password complexity is not the important bit of either of those tests.
2017-09-18 12:58:26 -05:00
Joseph Mastey 563ada1e04 refer to Rails 5 wiki (to be created) 2017-01-29 19:04:48 -06:00
cktricky 79c1ddd45d Fixes #165 2016-06-09 22:33:53 -04:00
Al Snow 0cc4980c46 Upgraded rspec-rails from 2.99.0 to 3.4.0 2016-04-14 17:34:27 -04:00
Al Snow fb923baee4 Upgraded rspec 2.14.2 to 2.99.0 2016-03-19 18:33:01 -04:00
Mike McCabe a93159c9f2 adding launchy 2013-10-09 11:07:13 -04:00