Sha256: e6213c6dd2019f021001b83f1095228d2f7878213e6927eee1059c3e553889cc

Contents?: true

Size: 510 Bytes

Versions: 17

Compression:

Stored size: 510 Bytes

Contents

require File.join(File.dirname(__FILE__), '..', '..', '..', 'lib', 'mongo')
require 'logger'

$con = Mongo::Connection.new
$db = $con['foo']

class Load < Sinatra::Base

  configure do
    LOGGER = Logger.new("sinatra.log")
    enable :logging, :dump_errors
    set :raise_errors, true
  end

  get '/' do
    3.times do |n|
      if (v=$db.eval("1 + #{n}")) != 1 + n
        STDERR << "#{1 + n} expected but got #{v}"
        raise StandardError, "#{1 + n} expected but got #{v}"
      end
    end
  end

end

Version data entries

17 entries across 17 versions & 5 rubygems

Version Path
jmongo-1.1.5 test/load/thin/load.rb
jmongo-1.1.4 test/load/thin/load.rb
jmongo-1.1.3 test/load/thin/load.rb
jmongo-1.1.2 test/load/thin/load.rb
jmongo-1.1.1 test/load/thin/load.rb
jmongo-1.1.0 test/load/thin/load.rb
vanity-1.7.1 vendor/ruby/1.9.1/gems/mongo-1.3.1/test/load/thin/load.rb
mongo-1.4.0 test/load/thin/load.rb
jonbell-mongo-1.3.1.2 test/load/thin/load.rb
mongo-lyon-1.2.4 test/load/thin/load.rb
mongo-1.3.1 test/load/thin/load.rb
mongo-1.3.0 test/load/thin/load.rb
mongo-1.3.0.rc0 test/load/thin/load.rb
mongo-1.2.4 test/load/thin/load.rb
mongo-1.2.3 test/load/thin/load.rb
mongo-1.2.2 test/load/thin/load.rb
mongo-1.2.1 test/load/thin/load.rb