Sha256: 179eddd9abd24144c4f1caf21f85b9fad39417f049602113f62ca0b256da72e5

Contents?: true

Size: 426 Bytes

Versions: 4

Compression:

Stored size: 426 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

4 entries across 4 versions & 1 rubygems

Version Path
pose-1.3.4 spec/support/matchers.rb
pose-1.3.3 spec/support/matchers.rb
pose-1.3.2 spec/support/matchers.rb
pose-1.3.1 spec/support/matchers.rb