Sha256: f87373867e9e8f519ab4f732bce1d42e294761d319b87c62e854a55111c2892e
Contents?: true
Size: 540 Bytes
Versions: 4
Compression:
Stored size: 540 Bytes
Contents
RSpec::Matchers.define :permit_editable_attributes do |*expected_attributes| description { "to permit editable attributes:#{expected_attributes}" } failure_message { "'#{actual}' does not permit attributes #{expected_attributes - actual.editable_attributes}" } match do |actual| actual_attributes = expected_attributes - actual.editable_attributes actual_attributes.empty? end match_when_negated do |actual| actual_attributes = expected_attributes & actual.editable_attributes actual_attributes.empty? end end
Version data entries
4 entries across 4 versions & 1 rubygems