模块:RSpec::Matchers::DSL::Macros::Deprecated 已弃用

包含于
RSpec::Matchers::DSL::Matcher
定义于
lib/rspec/matchers/dsl.rb

概述

已弃用。

请使用来自 RSpec::Matchers::DSL::Macros 的方法。

为向后兼容性定义了 RSpec 2 中已弃用的宏方法。

实例方法摘要 折叠

实例方法详情

#failure_message_for_should(&definition) ⇒Object

368
369
370
371
# File 'lib/rspec/matchers/dsl.rb', line 368
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

374
375
376
377
# File 'lib/rspec/matchers/dsl.rb', line 374
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

已弃用。
356
357
358
359
# File 'lib/rspec/matchers/dsl.rb', line 356
def match_for_should(&definition)
  RSpec.deprecate("`match_for_should`", :replacement => "`match`")
  match(&definition)
end

#match_for_should_not(&definition) ⇒Object

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