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.4.7 spec/support/matchers.rb
cf-5.4.7.rc1 spec/support/matchers.rb
cf-5.4.5 spec/support/matchers.rb
cf-5.4.4 spec/support/matchers.rb
trucker-cli-0.0.3 spec/support/matchers.rb
cf-5.4.3 spec/support/matchers.rb
cf-5.4.2 spec/support/matchers.rb
trucker-cli-0.0.2 spec/support/matchers.rb
trucker-cli-0.0.1 spec/support/matchers.rb
cf-5.4.1 spec/support/matchers.rb
cf-5.4.1.rc1 spec/support/matchers.rb
cf-5.4.0 spec/support/matchers.rb
cf-5.3.1 spec/support/matchers.rb
cf-5.3.0 spec/support/matchers.rb
cf-5.2.2 spec/support/matchers.rb
cf-5.2.1.rc15 spec/support/matchers.rb
cf-5.2.1.rc14 spec/support/matchers.rb
cf-5.2.1.rc13 spec/support/matchers.rb
cf-5.2.1.rc12 spec/support/matchers.rb
cf-5.2.1.rc11 spec/support/matchers.rb