Skip to content

Drop redundant require "spec_helper" from spec files#298

Merged
yahonda merged 1 commit into
rsim:masterfrom
yahonda:drop-redundant-spec-helper-requires
May 13, 2026
Merged

Drop redundant require "spec_helper" from spec files#298
yahonda merged 1 commit into
rsim:masterfrom
yahonda:drop-redundant-spec-helper-requires

Conversation

@yahonda
Copy link
Copy Markdown
Collaborator

@yahonda yahonda commented May 13, 2026

Summary

The project-level .rspec introduced in #294 contains --require spec_helper, which makes RSpec auto-load spec/spec_helper.rb before any example file. The explicit require "spec_helper" at the top of each spec/plsql/*.rb is therefore redundant.

Remove the require line plus the immediately-following blank line from all 11 files under spec/plsql/:

  • connection_spec.rb
  • package_spec.rb
  • procedure_spec.rb
  • schema_spec.rb
  • sequence_spec.rb
  • sql_statements_spec.rb
  • table_spec.rb
  • type_spec.rb
  • variable_spec.rb
  • version_spec.rb
  • view_spec.rb

The # encoding: utf-8 magic comment that appears at the top of three files (connection_spec.rb, procedure_spec.rb, variable_spec.rb) is intentionally left alone — out of scope here.

Diff stat: 11 files changed, 22 deletions(-).

Test plan

  • bundle exec rspec — 468 examples, 0 failures, 1 pre-existing pending (the Oracle 9.2 indexed-by-binary-integer skip). Confirms --require spec_helper from .rspec continues to load the helper before each example file.
  • Grep confirms zero remaining require "spec_helper" lines under spec/plsql/
  • CI matrix exercises all Ruby / AR / driver combinations

🤖 Generated with Claude Code

The project-level .rspec (added in rsim#294) sets `--require spec_helper`,
so each spec file's explicit `require "spec_helper"` is now redundant.
Remove the require line and the trailing blank line from all 11 spec
files under spec/plsql/.

Net change: -22 LOC. No behavior change. Full suite is green
(468 examples, 0 failures, 1 pre-existing pending).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@yahonda yahonda merged commit 1921ec6 into rsim:master May 13, 2026
20 checks passed
@yahonda yahonda deleted the drop-redundant-spec-helper-requires branch May 13, 2026 02:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant