Skip to content

Commit 38b0d6d

Browse files
committed
Merge pull request rails#4322 from castlerock/minitest_pending
ActiveSupport::Testing::Pending support for MiniTest only
2 parents 7a08685 + f04af7c commit 38b0d6d

File tree

1 file changed

+1
-33
lines changed
  • activesupport/lib/active_support/testing

1 file changed

+1
-33
lines changed

activesupport/lib/active_support/testing/pending.rb

+1-33
Original file line numberDiff line numberDiff line change
@@ -11,39 +11,7 @@ module Pending
1111
@@at_exit = false
1212

1313
def pending(description = "", &block)
14-
if defined?(::MiniTest)
15-
skip(description.blank? ? nil : description)
16-
else
17-
if description.is_a?(Symbol)
18-
is_pending = $tags[description]
19-
return block.call unless is_pending
20-
end
21-
22-
if block_given?
23-
failed = false
24-
25-
begin
26-
block.call
27-
rescue Exception
28-
failed = true
29-
end
30-
31-
flunk("<#{description}> did not fail.") unless failed
32-
end
33-
34-
caller[0] =~ (/(.*):(.*):in `(.*)'/)
35-
@@pending_cases << "#{$3} at #{$1}, line #{$2}"
36-
print "P"
37-
38-
@@at_exit ||= begin
39-
at_exit do
40-
puts "\nPending Cases:"
41-
@@pending_cases.each do |test_case|
42-
puts test_case
43-
end
44-
end
45-
end
46-
end
14+
skip(description.blank? ? nil : description)
4715
end
4816
end
4917

0 commit comments

Comments
 (0)