diff --git a/lib/rspec/core/example.rb b/lib/rspec/core/example.rb index ffa54a5ca7..0797562371 100644 --- a/lib/rspec/core/example.rb +++ b/lib/rspec/core/example.rb @@ -232,7 +232,10 @@ def example_group end alias_method :pending?, :pending - alias_method :skipped?, :skip + + def skipped? + !!skip + end # @api private # instance_execs the block passed to the constructor in the context of @@ -579,6 +582,10 @@ class ExecutionResult alias pending_fixed? pending_fixed + def initialize + @pending_fixed = false + end + # @return [Boolean] Indicates if the example was completely skipped # (typically done via `:skip` metadata or the `skip` method). Skipped examples # will have a `:pending` result. A `:pending` result can also come from examples diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index 4f75745a6d..7d4eb0a3f5 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -87,6 +87,9 @@ def handle_current_dir_change c.expect_with :rspec do |expectations| expectations.include_chain_clauses_in_custom_matcher_descriptions = true expectations.max_formatted_output_length = 1000 + if expectations.respond_to? :strict_predicate_matchers= + expectations.strict_predicate_matchers = true + end end c.mock_with :rspec do |mocks|