Permalink
Browse files

Support RSpec 2.6

[Closes #4]
  • Loading branch information...
1 parent 88d6687 commit e6da41a59be98a11902eb4322a35a6e0df06f830 @tpope committed Apr 14, 2012
Showing with 13 additions and 0 deletions.
  1. +13 −0 lib/fivemat/rspec.rb
View
@@ -33,6 +33,19 @@ def example_group_finished(group)
end
end
+ def pending_fixed?(example)
+ if example.execution_result[:exception].respond_to?(:pending_fixed?)
+ example.execution_result[:exception].pending_fixed?
+ else
+ ::RSpec::Core::PendingExampleFixedError === example.execution_result[:exception]
+ end
+ end
+
+ def dump_pending_fixed(example, index)
+ output.puts "#{short_padding}#{index.next}) #{example.full_description} FIXED"
+ output.puts blue("#{long_padding}Expected pending '#{example.metadata[:execution_result][:pending_message]}' to fail. No Error was raised.")
+ end
+
def start_dump
# Skip the call to output.puts in the messiest way possible.
self.class.superclass.superclass.instance_method(:start_dump).bind(self).call

0 comments on commit e6da41a

Please sign in to comment.