Sha256: e5a934b07962fd7aa56510f155a38ebed4e356b9b4adc1d72d58512e81a20adb

Contents?: true

Size: 672 Bytes

Versions: 14

Compression:

Stored size: 672 Bytes

Contents

module CouchPotato
  module RSpec
    module RunJS
      private
  
      def run_js(js)
        path = 'couch_potato_js_runner.js'
        File.open(path, 'w') {|f| f << js}
        `js #{path}`
      end
    end
  end
end


require File.dirname(__FILE__) + '/matchers/map_to_matcher'
require File.dirname(__FILE__) + '/matchers/reduce_to_matcher'

module Spec
  module Matchers
    def map(document)
      CouchPotato::RSpec::MapToProxy.new(document)
    end
    
    def reduce(docs, keys)
      CouchPotato::RSpec::ReduceToProxy.new(docs, keys)
    end
    
    def rereduce(docs, keys)
      CouchPotato::RSpec::ReduceToProxy.new(docs, keys, true)
    end
  end
end

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
couch_potato-0.2.27 lib/couch_potato/rspec/matchers.rb
couch_potato-0.2.26 lib/couch_potato/rspec/matchers.rb
couch_potato-0.2.25 lib/couch_potato/rspec/matchers.rb
couch_potato-0.2.24 lib/couch_potato/rspec/matchers.rb
couch_potato-0.2.23 lib/couch_potato/rspec/matchers.rb
couch_potato-0.2.22 lib/couch_potato/rspec/matchers.rb
couch_potato-0.2.21 lib/couch_potato/rspec/matchers.rb
couch_potato-0.2.20 lib/couch_potato/rspec/matchers.rb
couch_potato-0.2.19 lib/couch_potato/rspec/matchers.rb
couch_potato-0.2.18 lib/couch_potato/rspec/matchers.rb
couch_potato-0.2.17 lib/couch_potato/rspec/matchers.rb
couch_potato-0.2.16 lib/couch_potato/rspec/matchers.rb
couch_potato-0.2.15 lib/couch_potato/rspec/matchers.rb
couch_potato-0.2.14 lib/couch_potato/rspec/matchers.rb