-
Notifications
You must be signed in to change notification settings - Fork 739
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Showing
3 changed files
with
22 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,8 @@ | ||
task :default do | ||
sh "ruby test/test.rb --pride" | ||
require 'bundler/setup' | ||
require 'rake/testtask' | ||
|
||
Rake::TestTask.new do |t| | ||
t.pattern = 'test/tests/*.rb' | ||
end | ||
|
||
task default: :test |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,17 @@ | ||
## Testing | ||
|
||
Run `rake` or if you want to avoid bundler `cd test && ruby test.rb`. | ||
Run `bundle` then `rake` or if you want to avoid bundler `ruby test/test.rb`. | ||
|
||
This runs Brakeman against full apps in the `apps` directory and checks the results against what is expected. | ||
|
||
## Test Generation | ||
|
||
Run `cd test && ruby to_test.rb apps/some_app > tests/test_some_app.rb` to generate a test suite with tests for each warning reported. | ||
Run `cd test && ruby to_test.rb apps/some_app > tests/some_app.rb` to generate a test suite with tests for each warning reported. | ||
|
||
## Single File | ||
|
||
Run `ruby test/tests/some_file.rb` to run a single file of tests. | ||
|
||
## Single Test | ||
|
||
Ruby `ruby test/test.rb --name test_something` to run a single test. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters