Sha256: d838936087a921da44e278d8e5ceda13930dd37dc78e7f6c1eff046c827b829f
Contents?: true
Size: 331 Bytes
Versions: 43
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
43 entries across 43 versions & 1 rubygems