Module: RSpec::Matchers::DSL::Macros::Deprecated Deprecated

Included in:
RSpec::Matchers::DSL::Matcher
Defined in:
lib/rspec/matchers/dsl.rb

Overview

Deprecated.

Use the methods from RSpec::Matchers::DSL::Macros instead.

Defines deprecated macro methods from RSpec 2 for backwards compatibility.

Instance Method Summary collapse

Instance Method Details

#failure_message_for_should(&definition) ⇒ Object

365
366
367
368
# File 'lib/rspec/matchers/dsl.rb', line 365
def failure_message_for_should(&definition)
  RSpec.deprecate("`failure_message_for_should`", :replacement => "`failure_message`")
  failure_message(&definition)
end

#failure_message_for_should_not(&definition) ⇒ Object

371
372
373
374
# File 'lib/rspec/matchers/dsl.rb', line 371
def failure_message_for_should_not(&definition)
  RSpec.deprecate("`failure_message_for_should_not`", :replacement => "`failure_message_when_negated`")
  failure_message_when_negated(&definition)
end

#match_for_should(&definition) ⇒ Object

Deprecated.
353
354
355
356
# File 'lib/rspec/matchers/dsl.rb', line 353
def match_for_should(&definition)
  RSpec.deprecate("`match_for_should`", :replacement => "`match`")
  match(&definition)
end

#match_for_should_not(&definition) ⇒ Object

359
360
361
362
# File 'lib/rspec/matchers/dsl.rb', line 359
def match_for_should_not(&definition)
  RSpec.deprecate("`match_for_should_not`", :replacement => "`match_when_negated`")
  match_when_negated(&definition)
end