# -*- encoding : utf-8 -*-
module MotionSpec
  module Matcher
    class Include
      def initialize(*values)
        @values = *values
      end

      def matches?(subject)
        @values.all? { |v| subject.include?(v) }
      end

      def fail!(subject, negated)
        fail FailedExpectation.new(
          FailMessageRenderer.message_for_include(negated, subject, @values)
        )
      end
    end
  end
end
