Skip to content

Add missing specs for Scanner#initialize#413

Open
kallal79 wants to merge 1 commit intorubysec:masterfrom
kallal79:add-scanner-initialize-specs
Open

Add missing specs for Scanner#initialize#413
kallal79 wants to merge 1 commit intorubysec:masterfrom
kallal79:add-scanner-initialize-specs

Conversation

@kallal79
Copy link

Adds comprehensive specs for Scanner#initialize covering:

  • Default root (Dir.pwd) when no arguments given
  • Setting #root to the expanded directory path
  • Setting #database to a Database instance
  • Setting #lockfile by parsing Gemfile.lock
  • Raising Bundler::GemfileLockNotFound when lock file is missing
  • Error message includes lock file name
  • Custom gemfile_lock name (valid and invalid)
  • Custom database parameter
  • Loading .bundler-audit.yml config when present
  • Absolute config_dot_file path
  • Relative config_dot_file path
  • Default empty Configuration when no config file exists

Closes #326

Adds comprehensive specs for Scanner#initialize covering:
- Default root (Dir.pwd) when no arguments given
- Setting #root to the expanded directory path
- Setting #database to a Database instance
- Setting #lockfile by parsing Gemfile.lock
- Raising Bundler::GemfileLockNotFound when lock file is missing
- Error message includes lock file name
- Custom gemfile_lock name (valid and invalid)
- Custom database parameter
- Loading .bundler-audit.yml config when present
- Absolute config_dot_file path
- Relative config_dot_file path
- Default empty Configuration when no config file exists

Closes rubysec#326
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.

Add missing specs for Scanner#initialize

1 participant