Flowdock
method

duck_type

Importance_1
RSpec latest stable (1.3.1) - 0 notes - Class: Spec::Mocks::ArgumentConstraints

Method deprecated or moved

This method is deprecated or moved on the latest stable version. The last existing version (1.1.12) is shown here.

These similar methods exist in 1.3.1:

duck_type(*args) public

Passes if the argument responds to the specified messages.

Examples

  array = []
  display = mock('display')
  display.should_receive(:present_names).with(duck_type(:length, :each))
  => passes
Show source
Register or log in to add new notes.