File tree Expand file tree Collapse file tree 6 files changed +11
-5
lines changed Expand file tree Collapse file tree 6 files changed +11
-5
lines changed Original file line number Diff line number Diff line change @@ -26,7 +26,7 @@ namespace :spec do
26
26
end
27
27
28
28
task :isolated_specs do
29
- Dir [ "spec/isolated/*" ] . each do |file |
29
+ Dir [ "spec/isolated/**/*_spec.rb " ] . each do |file |
30
30
sh "bundle exec ruby #{ file } "
31
31
end
32
32
end
Original file line number Diff line number Diff line change 13
13
require "sentry/rails"
14
14
require "minitest/autorun"
15
15
16
+ # isolated tests need a SimpleCov name otherwise they will overwrite coverage
17
+ SimpleCov . command_name "RailsIsolatedActiveJobActivation"
18
+
16
19
class TestApp < Rails ::Application
17
20
end
18
21
Original file line number Diff line number Diff line change @@ -14,7 +14,7 @@ RSpec::Core::RakeTask.new(:spec).tap do |task|
14
14
end
15
15
16
16
task :isolated_specs do
17
- Dir [ "spec/isolated/*" ] . each do |file |
17
+ Dir [ "spec/isolated/**/*_spec.rb " ] . each do |file |
18
18
sh "bundle exec rspec #{ file } "
19
19
end
20
20
end
Original file line number Diff line number Diff line change 1
1
# frozen_string_literal: true
2
2
3
- require_relative "../spec_helper"
3
+ require "sentry-ruby"
4
+ require "sentry/test_helper"
4
5
5
6
Sentry . init do |config |
6
7
config . dsn = Sentry ::TestHelper ::DUMMY_DSN
Original file line number Diff line number Diff line change 2
2
3
3
require_relative "../spec_helper"
4
4
5
- SimpleCov . command_name "RSpecIsolated"
5
+ # isolated tests need a SimpleCov name otherwise they will overwrite coverage
6
+ SimpleCov . command_name "RSpecIsolatedInit"
6
7
7
8
RSpec . describe Sentry do
8
9
context "works within a trap context" , when : { ruby_engine? : "ruby" } do
Original file line number Diff line number Diff line change 6
6
# Because puma doesn't have any dependency, if Rack is not installed the entire test won't work
7
7
return if ENV [ "RACK_VERSION" ] == "0"
8
8
9
- SimpleCov . command_name "RSpecIsolated"
9
+ # isolated tests need a SimpleCov name otherwise they will overwrite coverage
10
+ SimpleCov . command_name "RSpecIsolatedPuma"
10
11
11
12
RSpec . describe Puma ::Server do
12
13
class TestServer
You can’t perform that action at this time.
0 commit comments