Skip to content

Commit e0325e5

Browse files
committed
travis: run rake tests in isolation
1 parent 62a4885 commit e0325e5

File tree

2 files changed

+13
-0
lines changed

2 files changed

+13
-0
lines changed

.travis.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@ before_install:
88
- gem uninstall -v '>= 2' -i $(rvm gemdir)@global -ax bundler || true
99
- gem install bundler -v '< 2'
1010

11+
script:
12+
- bundle exec rake test:ci
13+
1114
matrix:
1215
fast_finish: true
1316
include:

Rakefile

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,4 +15,14 @@ Rake::TestTask.new(:test) do |t|
1515
t.test_files = FileList["test/**/*_test.rb"]
1616
end
1717

18+
namespace :test do
19+
task :isolated do
20+
Dir.glob("test/**/*_test.rb").all? do |file|
21+
sh(Gem.ruby, "-w", "-Ilib:test", file)
22+
end || raise("Failures")
23+
end
24+
25+
task ci: %w[rubocop test:isolated spec]
26+
end
27+
1828
task default: [:rubocop, :test, :spec]

0 commit comments

Comments
 (0)