Sha256: 8db706f0dc27ee112b02aa5e3d5f163b3eab666c96b6626af0a00c50e92d8f33

Contents?: true

Size: 425 Bytes

Versions: 6

Compression:

Stored size: 425 Bytes

Contents

# Verifies that a posable object has the given pose words in its search index.
RSpec::Matchers.define :have_pose_words do |*expected|

  match do |actual|
    actual.pose_words.map(&:text).sort == expected.flatten.sort
  end

  failure_message_for_should do |actual|
    texts = actual.pose_words.map &:text
    "expected that subject would have pose words [#{expected.join ', '}], but it has [#{texts.join ', '}]"
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
pose-3.2.0 spec/support/matchers.rb
pose-3.1.1 spec/support/matchers.rb
pose-3.0.0 spec/support/matchers.rb
pose-2.1.0 spec/support/matchers.rb
pose-2.0.1 spec/support/matchers.rb
pose-2.0.0 spec/support/matchers.rb