Sha256: 4f1bd8501131089834514917dbd1782704135ba05b04369064286cebad078413
Contents?: true
Size: 527 Bytes
Versions: 1
Compression:
Stored size: 527 Bytes
Contents
# frozen_string_literal: true module RSpec module Grape module Entity module Matchers module HaveKeyMatcher extend RSpec::Matchers::DSL matcher :have_key do |expected| include MatcherHelpers match { |actual| exposure_attribute(actual, :key) == expected } description { "have the key #{expected}" } failure_message { |actual| "expect that #{actual} would have the key #{expected}" } end end end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
rspec-grape-entity-0.1.0 | lib/rspec_grape_entity/matchers/have_key_matcher.rb |