Sha256: 16e491c59dedf3c1a7ba7ff10ef59ffdea8bcfbe613b1a256bb1113a2566982a

Contents?: true

Size: 734 Bytes

Versions: 2

Compression:

Stored size: 734 Bytes

Contents

require 'execjs'

require 'couch_potato/rspec/matchers/map_to_matcher'
require 'couch_potato/rspec/matchers/reduce_to_matcher'
require 'couch_potato/rspec/matchers/map_reduce_to_matcher'
require 'couch_potato/rspec/matchers/list_as_matcher'

module RSpec
  module Matchers
    def map(document)
      CouchPotato::RSpec::MapToProxy.new(document)
    end

    def reduce(keys, values)
      CouchPotato::RSpec::ReduceToProxy.new(keys, values)
    end

    def rereduce(keys, values)
      CouchPotato::RSpec::ReduceToProxy.new(keys, values, true)
    end

    def list(results)
      CouchPotato::RSpec::ListAsProxy.new(results)
    end

    def map_reduce(*docs)
      CouchPotato::RSpec::MapReduceToProxy.new(docs)
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
couch_potato-rspec-4.1.0 lib/couch_potato/rspec/matchers.rb
couch_potato-rspec-4.0.2 lib/couch_potato/rspec/matchers.rb