-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #29 from inkstak/fix_test_suite
Update test suite & appraisal setup
- Loading branch information
Showing
4 changed files
with
25 additions
and
18 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
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,20 +1,31 @@ | ||
# frozen_string_literal: true | ||
|
||
require "bundler/gem_tasks" | ||
require "appraisal" | ||
require "rspec/core/rake_task" | ||
require "rubocop/rake_task" | ||
require "standard/rake" | ||
|
||
RSpec::Core::RakeTask.new(:spec) | ||
RuboCop::RakeTask.new | ||
|
||
desc "Run the full CI" | ||
task :default do | ||
Rake::Task["spec"].invoke | ||
Rake::Task["rubocop"].invoke | ||
if ENV["APPRAISAL_INITIALIZED"] | ||
Rake::Task["spec"].invoke | ||
else | ||
# FYI: Standard & appraisal requires each a spawn process. | ||
|
||
# FYI: Standard requires a spawn process. | ||
# Otherwise it may be tainted by the rubocop task and | ||
# report offenses from other plugins putted in .rubocop_todo.yml | ||
# https://github.com/testdouble/standard/issues/480 | ||
fail unless system "bundle exec rake standard" | ||
# Additional tasks won't run after appraisal because of | ||
# something to do with the exit code. | ||
# https://github.com/thoughtbot/appraisal/issues/144 | ||
|
||
# Otherwise it may be tainted by the rubocop task and | ||
# report offenses from other plugins putted in .rubocop_todo.yml | ||
# https://github.com/testdouble/standard/issues/480 | ||
|
||
fail unless system "bundle exec appraisal rspec" | ||
fail unless system "bundle exec rubocop" | ||
fail unless system "bundle exec rake standard" | ||
end | ||
end |
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