forked from newleaders/thincloud-test
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add new generator (standalone) with its own helper to be used when tests are needed outside of Rails.
- Loading branch information
Showing
3 changed files
with
35 additions
and
1 deletion.
There are no files selected for viewing
18 changes: 18 additions & 0 deletions
18
lib/generators/thincloud/test/templates/minitest_helper_standalone.rb
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 |
---|---|---|
@@ -0,0 +1,18 @@ | ||
if RUBY_ENGINE == "ruby" | ||
begin | ||
require "simplecov" | ||
SimpleCov.start do | ||
add_filter "test" | ||
add_filter "config" | ||
command_name "MiniTest" | ||
end | ||
rescue LoadError | ||
warn "unable to load SimpleCov" | ||
end | ||
end | ||
|
||
require "thincloud-test" | ||
|
||
# Requires supporting ruby files with custom matchers and macros, etc, | ||
# in spec/support/ and its subdirectories. | ||
Dir[File.join("./test/support/**/*.rb")].sort.each { |f| require f } |
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
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