Sha256: ffaec7807e502c1def209e21b4bc82d87c3e4607b4bb3334f10198a116c8c083
Contents?: true
Size: 487 Bytes
Versions: 125
Compression:
Stored size: 487 Bytes
Contents
require File.join(File.dirname(__FILE__), '..', '..', 'lib', 'mongo') $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
125 entries across 79 versions & 7 rubygems