-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: Conserta execução dos testes (#62)
* fix: conserta execução dos testes * fix: conserta testes na CI
- Loading branch information
1 parent
92266c1
commit 086f535
Showing
3 changed files
with
27 additions
and
4 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
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 @@ | ||
--require spec_helper | ||
--require rails_helper | ||
--format documentation | ||
--require spec_helper |
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,25 @@ | ||
#!/usr/bin/env ruby | ||
require "fileutils" | ||
|
||
# path to your application root. | ||
APP_ROOT = File.expand_path("..", __dir__) | ||
|
||
def system!(*args) | ||
system(*args) || abort("\n== Command #{args} failed ==") | ||
end | ||
|
||
FileUtils.chdir APP_ROOT do | ||
puts "\n== Running RSpec ==" | ||
if ARGV.first&.include?("--auto") | ||
unless system("gem list retest -i --silent") | ||
puts "Installing retest..." | ||
system("gem install retest") | ||
end | ||
|
||
puts "retest 'bundle exec rspec <test>'" | ||
system "retest 'bundle exec rspec <test>'" | ||
else | ||
puts "bundle exec rspec #{ARGV.join(' ')}" | ||
system "bundle exec rspec #{ARGV.join(' ')}" | ||
end | ||
end |