Sha256: 35d46718ca5cf7068cd945c6c58e3c84f02b63a3f284514771a19c5ab0af3e1e

Contents?: true

Size: 391 Bytes

Versions: 3

Compression:

Stored size: 391 Bytes

Contents

RSpec::Matchers.define :generate_palette do |expected|
  expected.map!(&:paint)

  match do |actual|
    actual == expected
  end
end

RSpec::Matchers.define :have_format do |expected|
  match do |actual|
    actual.format == expected
  end
end

RSpec::Matchers.define :be_dark do
  match { |value| value.dark? }
end

RSpec::Matchers.define :be_light do
  match { |value| value.light? }
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
chroma-0.2.0 spec/custom_matchers.rb
chroma-0.1.0 spec/custom_matchers.rb
chroma-0.0.1 spec/custom_matchers.rb