Sha256: 430a560f83a550a2f2480c74b5b101e930b1ef732af36eefb5709906e4288d06

Contents?: true

Size: 735 Bytes

Versions: 5

Compression:

Stored size: 735 Bytes

Contents

module Remarkable
  module Specs
    module Matchers
      class CollectionContainMatcher < Remarkable::Base
        arguments :collection => :values, :as => :value

        optional :working
        default_options :working => true

        assertion :is_array? do
          @subject.is_a?(Array)
        end

        collection_assertion :included? do
          return @subject.include?(@value), :more => 'that '
        end

        after_initialize do
          @after_initialize = true
        end

        before_assert do
          @before_assert = true
        end
      end

      def collection_contain(*args)
        CollectionContainMatcher.new(*args).spec(self)
      end
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
remarkable-3.0.0 spec/matchers/collection_contain_matcher.rb
remarkable-3.0.1 spec/matchers/collection_contain_matcher.rb
remarkable-3.0.2 spec/matchers/collection_contain_matcher.rb
remarkable-3.0.3 spec/matchers/collection_contain_matcher.rb
remarkable-3.0.4 spec/matchers/collection_contain_matcher.rb