Commit Graph

20 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
Nicole Rifkin d82ff9a66a clean up insecure_dor_spec 2019-11-20 09:24:24 -05:00
Nicole Rifkin 7eb0ddf229 clean up insecure_dor_spec 2019-11-20 07:49:52 -05:00
cktricky 00af8293b2 changed user_id to id 2017-12-19 08:26:02 -05:00
Joseph Mastey 33d2c46df5 please robot overlords, plus verbiage change 2017-12-13 08:37:23 -06: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 bb863f5156 appease our new robot overlords.
(I voted for Krang)
2017-12-12 21:00:45 -06:00
Joseph Mastey 6969322920 feat(tests): fix tests for change in user_id format 2017-12-12 15:22:39 -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
Mike McCabe 39e8f75e2d fixing IDOR spec 2017-10-04 13:43:34 -04:00
Joseph Mastey 8c38edd90b upgrade(rails-5): we updated the db/config, broke the test that extracts it 2017-01-19 15:53:24 -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 0957033457 Upgraded to Ruby 2.1.3; Changed timeout value 2014-09-19 19:00:40 -04:00
Al Snow 74d047507a Changed timeout to 25000 for all envs 2014-09-19 11:12:32 -04:00
Al Snow 1ea0c2ddbb More Rails 4.0 upgrade changes
1. Compared existing branch with empty Rails 4.0 project and
    made changes as needed.
 2. Fix find/first warning.
 3. Fix sqlite timeout issue.
    -- config/database.yml
    -- spec/vulnerabilities/insecure_dor_spec.rb
2014-09-13 13:44:07 -04:00
cktricky 4af22d952d fixed broken spec test 2014-04-18 09:25:07 -04:00
cktricky c157496b1e fixed broken spec test by changing the reference to an incorrect location when downloading the database.yml file 2014-04-17 20:17:33 -04:00
Mike McCabe a93159c9f2 adding launchy 2013-10-09 11:07:13 -04:00