Sha256: d27c9ac9a0082aa443f815a9920dcfb198a6ac5a51de99ef06f784fc585db14d
Contents?: true
Size: 335 Bytes
Versions: 139
Compression:
Stored size: 335 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
139 entries across 139 versions & 3 rubygems