Skip to content

Commit 6e0b175

Browse files
committed
Remove condition minutes as they are unnecessary.
1 parent 23d8981 commit 6e0b175

File tree

1 file changed

+17
-19
lines changed

1 file changed

+17
-19
lines changed

test/test_rake_application.rb

Lines changed: 17 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -60,31 +60,29 @@ def test_display_exception_details
6060
assert_match __method__.to_s, err
6161
end
6262

63-
if Exception.method_defined?(:detailed_message)
64-
def test_display_exception_details_with_detailed_message
65-
error_class = Class.new(StandardError) do
66-
def detailed_message(**)
67-
"detailed_message!!"
68-
end
63+
def test_display_exception_details_with_detailed_message
64+
error_class = Class.new(StandardError) do
65+
def detailed_message(**)
66+
"detailed_message!!"
6967
end
68+
end
7069

71-
begin
72-
raise error_class
73-
rescue error_class => ex
74-
end
70+
begin
71+
raise error_class
72+
rescue error_class => ex
73+
end
7574

76-
out, err = capture_io do
77-
@app.set_default_options # reset trace output IO
75+
out, err = capture_io do
76+
@app.set_default_options # reset trace output IO
7877

79-
@app.display_error_message ex
80-
end
78+
@app.display_error_message ex
79+
end
8180

82-
assert_empty out
81+
assert_empty out
8382

84-
assert_match "rake aborted!", err
85-
assert_match "detailed_message!!", err
86-
assert_match __method__.to_s, err
87-
end
83+
assert_match "rake aborted!", err
84+
assert_match "detailed_message!!", err
85+
assert_match __method__.to_s, err
8886
end
8987

9088
def test_display_exception_details_bad_encoding

0 commit comments

Comments
 (0)