Sha256: 77548774587b775dbbdfba6d088cc82df87e4488fa983549b7b2c1fe090dbe98
Contents?: true
Size: 390 Bytes
Versions: 1
Compression:
Stored size: 390 Bytes
Contents
# frozen_string_literal: true module Quickdraw::Matchers::ToHaveAttributes def to_have_attributes(**attributes) attributes.each do |k, v| assert v === value.send(k) do "expected `#{value.inspect}` to have the attribute `#{k.inspect}` equal to `#{v.inspect}`" end end rescue NoMethodError => e failure! { "expected `#{value.inspect}` to respond to `#{e.name}`" } end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
quickdraw-0.1.0 | lib/quickdraw/matchers/to_have_attributes.rb |