Sha256: dbf4880cac853bf3f3a75aa4e84ee8047d3e763038415a833a1c51c26e2b9da4

Contents?: true

Size: 763 Bytes

Versions: 11

Compression:

Stored size: 763 Bytes

Contents

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

        optional :working, :allow_nil
        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, &block)
        CollectionContainMatcher.new(*args, &block).spec(self)
      end
    end
  end
end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
remarkable-3.1.7 spec/matchers/collection_contain_matcher.rb
remarkable-3.1.8 spec/matchers/collection_contain_matcher.rb
remarkable-3.0.9 spec/matchers/collection_contain_matcher.rb
remarkable-3.0.10 spec/matchers/collection_contain_matcher.rb
remarkable-3.1.4 spec/matchers/collection_contain_matcher.rb
remarkable-3.1.5 spec/matchers/collection_contain_matcher.rb
remarkable-3.1.6 spec/matchers/collection_contain_matcher.rb
remarkable-3.1.2 spec/matchers/collection_contain_matcher.rb
remarkable-3.1.0 spec/matchers/collection_contain_matcher.rb
remarkable-3.1.1 spec/matchers/collection_contain_matcher.rb
remarkable-3.1.3 spec/matchers/collection_contain_matcher.rb