# File lib/rspec-puppet/matchers/parameter_matcher.rb, line 23
      def matches?(resource)

        @resource = resource

        actual   = @resource[@parameter]
        expected = @value

        # Puppet flattens an array with a single value into just the value and
        # this can cause confusion when testing as people expect when you put
        # an array in, you'll get an array out.
        actual = [*actual] if expected.is_a?(Array)

        retval = check(expected, actual)

        unless retval
          @errors << MatchError.new(@parameter, expected, actual, !@should_match)
        end

        retval
      end