Sha256: a8103e0c50747a834046ad76253b0dafe068240893917e2d4cf59a877e8f19ff
Contents?: true
Size: 331 Bytes
Versions: 1
Compression:
Stored size: 331 Bytes
Contents
RSpec::Matchers.define :have_attributes do |expected_attributes| match do |actual| # actual is a Hash object representing an object, like this: # { "name" => "Product #1" } actual_attributes = actual.keys.map(&:to_sym) expected_attributes.map(&:to_sym).all? { |attr| actual_attributes.include?(attr) } end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
refinerycms-api-1.0.0.beta | spec/support/have_attributes_matcher.rb |