File tree Expand file tree Collapse file tree 3 files changed +18
-2
lines changed Expand file tree Collapse file tree 3 files changed +18
-2
lines changed Original file line number Diff line number Diff line change @@ -20,10 +20,10 @@ class Task
20
20
alias orig_execute execute
21
21
22
22
def execute ( args = nil )
23
- return orig_execute unless Sentry . initialized? && Sentry . get_current_hub
23
+ return orig_execute ( args ) unless Sentry . initialized? && Sentry . get_current_hub
24
24
25
25
Sentry . get_current_hub . with_background_worker_disabled do
26
- orig_execute
26
+ orig_execute ( args )
27
27
end
28
28
end
29
29
end
Original file line number Diff line number Diff line change 24
24
25
25
expect ( message ) . not_to match ( /Sentry/ )
26
26
end
27
+
28
+ it "run rake task with original arguments" do
29
+ message = ""
30
+
31
+ # if we change the directory in the current process, it'll affect other tests that relies on system call too
32
+ # e.g. release detection tests
33
+ Thread . new do
34
+ message = `cd spec/support && bundle exec rake pass_arguments[arguments]`
35
+ end . join
36
+
37
+ expect ( message ) . to match ( "arguments" )
38
+ end
27
39
end
Original file line number Diff line number Diff line change 14
14
Sentry . configuration . skip_rake_integration = true
15
15
1 /0
16
16
end
17
+
18
+ task :pass_arguments , [ 'name' ] do |_task , args |
19
+ puts args [ :name ]
20
+ end
You can’t perform that action at this time.
0 commit comments