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