Sha256: 12e211b9e1c5601df73f8b07f9b0ff280651aa0333d565a5bd4306ac9adf5671

Contents?: true

Size: 583 Bytes

Versions: 7

Compression:

Stored size: 583 Bytes

Contents

RSpec::Matchers.constants.each do |c|
  if Class === (klass = RSpec::Matchers.const_get(c))
    if klass.public_instance_methods.any? {|m| ['failure_message_for_should',:failure_message_for_should].include?(m)}
      klass.class_exec do
        alias_method :failure_message, :failure_message_for_should
      end
    end
    if klass.public_instance_methods.any? {|m| ['failure_message_for_should_not',:failure_message_for_should_not].include?(m)}
      klass.class_exec do
        alias_method :negative_failure_message, :failure_message_for_should_not
      end
    end
  end
end

Version data entries

7 entries across 7 versions & 3 rubygems

Version Path
opal-rspec-cj-0.4.4 vendor_lib/rspec/matchers/compatibility.rb
opal-rspec-0.4.3 vendor_lib/rspec/matchers/compatibility.rb
opal-rspec-0.4.2 vendor_lib/rspec/matchers/compatibility.rb
opal-rspec-0.4.1 vendor_lib/rspec/matchers/compatibility.rb
opal-rspec-0.4.0 vendor_lib/rspec/matchers/compatibility.rb
opal-rspec-0.4.0.beta4 vendor_lib/rspec/matchers/compatibility.rb
rspec-expectations-3.0.0.beta1 lib/rspec/matchers/compatibility.rb