Sha256: b6e17a644b6cfe03d345197334c18d116cc6b8eb3565becc6b0ffc1aeb696e1d

Contents?: true

Size: 340 Bytes

Versions: 34

Compression:

Stored size: 340 Bytes

Contents

class HasLabelMatcher
  def initialize(expected_label)
    @expected = expected_label
  end
  def failure_message_for_should
    "#{actual} does not have label #{@expected}"
  end
  def ==(actual)
    actual.label == @expected
  end
  alias_method :matches?, :==
end

def has_label(expected_label)
  HasLabelMatcher.new(expected_label)
end

Version data entries

34 entries across 34 versions & 2 rubygems

Version Path
cf-5.2.1.rc10 spec/support/matchers.rb
cf-5.2.1.rc9 spec/support/matchers.rb
cf-5.2.1.rc8 spec/support/matchers.rb
cf-5.2.1.rc7 spec/support/matchers.rb
cf-5.2.1.rc6 spec/support/matchers.rb
cf-5.2.1.rc5 spec/support/matchers.rb
cf-5.2.1.rc4 spec/support/matchers.rb
cf-5.2.1.rc3 spec/support/matchers.rb
cf-5.2.1.rc2 spec/support/matchers.rb
cf-5.2.0 spec/support/matchers.rb
cf-5.1.0.rc1 spec/support/matchers.rb
cf-5.0.0.rc4 spec/support/matchers.rb
cf-5.0.0.rc3 spec/support/matchers.rb
cf-4.2.9.rc5 spec/support/matchers.rb