[Gary] require test_helper edits to work everywhere including via IDE (RubyMine), Gemfile for JRuby

This commit is contained in:
Gary Murakami 2012-04-11 11:08:04 -04:00
parent 4ca05fe138
commit 64c87e93a3
47 changed files with 49 additions and 47 deletions

2
.gitignore vendored
View File

@ -21,3 +21,5 @@ test/load/thin/config.yml
test/tools/data/
.rvmrc
Gemfile.lock
.idea/*

View File

@ -5,7 +5,7 @@ group :development, :test do
gem "bundler"
gem "rake"
gem "json"
gem "bson_ext"
gem "bson_ext" unless RUBY_PLATFORM == "java"
# Deployment
gem "git"
@ -15,7 +15,7 @@ group :development, :test do
gem "shoulda"
gem "test-unit"
gem "ci_reporter"
gem "ruby-prof"
gem "ruby-prof" unless RUBY_PLATFORM == "java"
# Java
platforms :jruby do

View File

@ -1,7 +1,7 @@
$:.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
require 'mongo'
require 'test/unit'
require './test/test_helper'
require File.expand_path("../../test_helper", __FILE__)
# Demonstrate features in MongoDB 1.4
class Features14Test < Test::Unit::TestCase

View File

@ -1,7 +1,7 @@
$:.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
require 'mongo'
require 'test/unit'
require './test/test_helper'
require File.expand_path("../../test_helper", __FILE__)
# NOTE: This test requires bouncing the server.
# It also requires that a user exists on the admin database.

View File

@ -1,7 +1,7 @@
$:.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
require 'mongo'
require 'test/unit'
require './test/test_helper'
require File.expand_path("../../test_helper", __FILE__)
# NOTE: This test requires bouncing the server
class AutoreconnectTest < Test::Unit::TestCase

View File

@ -1,7 +1,7 @@
$:.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
require 'mongo'
require 'test/unit'
require './test/test_helper'
require File.expand_path("../../test_helper", __FILE__)
class ForkTest < Test::Unit::TestCase
include Mongo

View File

@ -1,5 +1,5 @@
$:.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
require './test/test_helper'
require File.expand_path("../../test_helper", __FILE__)
require './test/tools/auth_repl_set_manager'
require './test/replica_sets/rs_test_helper'

View File

@ -1,4 +1,4 @@
require './test/test_helper'
require File.expand_path("../../test_helper", __FILE__)
# NOTE: these tests are run only if we can connect to a single MongoDB in slave mode.
class SlaveConnectionTest < Test::Unit::TestCase

View File

@ -2,7 +2,7 @@ $:.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
require 'mongo'
require 'thread'
require 'test/unit'
require './test/test_helper'
require File.expand_path("../../test_helper", __FILE__)
# NOTE: This test requires bouncing the server.
# It also requires that a user exists on the admin database.

View File

@ -1,5 +1,5 @@
# encoding:utf-8
require './test/bson/test_helper'
require File.expand_path("../test_helper", __FILE__)
class BinaryTest < Test::Unit::TestCase
def setup

View File

@ -1,5 +1,5 @@
# encoding:utf-8
require './test/bson/test_helper'
require File.expand_path("../test_helper", __FILE__)
require 'set'
if RUBY_VERSION < '1.9'

View File

@ -1,5 +1,5 @@
# encoding: binary
require './test/bson/test_helper'
require File.expand_path("../test_helper", __FILE__)
class ByteBufferTest < Test::Unit::TestCase
include BSON

View File

@ -1,5 +1,5 @@
# encoding:utf-8
require './test/bson/test_helper'
require File.expand_path("../test_helper", __FILE__)
require './test/support/hash_with_indifferent_access'
class HashWithIndifferentAccessTest < Test::Unit::TestCase

View File

@ -1,4 +1,4 @@
require './test/bson/test_helper'
require File.expand_path("../test_helper", __FILE__)
require 'rubygems'
require 'json'

View File

@ -1,4 +1,4 @@
require './test/bson/test_helper'
require File.expand_path("../test_helper", __FILE__)
require 'rubygems'
require 'json'

View File

@ -1,4 +1,4 @@
require './test/bson/test_helper'
require File.expand_path("../test_helper", __FILE__)
class OrderedHashTest < Test::Unit::TestCase

View File

@ -1,4 +1,4 @@
require './test/bson/test_helper'
require File.expand_path("../test_helper", __FILE__)
class TimestampTest < Test::Unit::TestCase

View File

@ -1,4 +1,4 @@
require './test/test_helper'
require File.expand_path("../test_helper", __FILE__)
require 'rbconfig'
class TestCollection < Test::Unit::TestCase

View File

@ -1,4 +1,4 @@
require './test/test_helper'
require File.expand_path("../test_helper", __FILE__)
require 'logger'
require 'stringio'
require 'thread'

View File

@ -1,4 +1,4 @@
require './test/test_helper'
require File.expand_path("../test_helper", __FILE__)
require 'mongo/exceptions'
require 'mongo/util/conversions'

View File

@ -1,4 +1,4 @@
require './test/test_helper'
require File.expand_path("../test_helper", __FILE__)
require 'logger'
class CursorFailTest < Test::Unit::TestCase

View File

@ -1,4 +1,4 @@
require './test/test_helper'
require File.expand_path("../test_helper", __FILE__)
require 'logger'
class CursorMessageTest < Test::Unit::TestCase

View File

@ -1,4 +1,4 @@
require './test/test_helper'
require File.expand_path("../test_helper", __FILE__)
require 'logger'
class CursorTest < Test::Unit::TestCase

View File

@ -1,4 +1,4 @@
require './test/test_helper'
require File.expand_path("../test_helper", __FILE__)
class DBAPITest < Test::Unit::TestCase
include Mongo

View File

@ -1,4 +1,4 @@
require './test/test_helper'
require File.expand_path("../test_helper", __FILE__)
class DBConnectionTest < Test::Unit::TestCase

View File

@ -1,4 +1,4 @@
require './test/test_helper'
require File.expand_path("../test_helper", __FILE__)
require 'digest/md5'
require 'stringio'
require 'logger'

View File

@ -1,4 +1,4 @@
require './test/test_helper'
require File.expand_path("../test_helper", __FILE__)
class GridFileSystemTest < Test::Unit::TestCase
context "GridFileSystem:" do

View File

@ -1,4 +1,4 @@
require './test/test_helper'
require File.expand_path("../test_helper", __FILE__)
class GridIOTest < Test::Unit::TestCase

View File

@ -1,4 +1,4 @@
require './test/test_helper'
require File.expand_path("../test_helper", __FILE__)
include Mongo
def read_and_write_stream(filename, read_length, opts={})

View File

@ -1,4 +1,4 @@
require './test/test_helper'
require File.expand_path("../test_helper", __FILE__)
require 'thread'
class PoolTest < Test::Unit::TestCase

View File

@ -1,5 +1,5 @@
$:.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
require './test/test_helper'
require File.expand_path("../../test_helper", __FILE__)
require './test/tools/repl_set_manager'
class Test::Unit::TestCase

View File

@ -1,4 +1,4 @@
require './test/test_helper'
require File.expand_path("../test_helper", __FILE__)
include Mongo
class SafeTest < Test::Unit::TestCase

View File

@ -1,4 +1,4 @@
require './test/test_helper'
require File.expand_path("../test_helper", __FILE__)
class SupportTest < Test::Unit::TestCase

View File

@ -1,4 +1,4 @@
require './test/test_helper'
require File.expand_path("../../test_helper", __FILE__)
# Essentialy the same as test_threading.rb but with an expanded pool for
# testing multiple connections.

View File

@ -1,4 +1,4 @@
require './test/test_helper'
require File.expand_path("../test_helper", __FILE__)
class TestThreading < Test::Unit::TestCase

View File

@ -1,4 +1,4 @@
require './test/test_helper'
require File.expand_path("../test_helper", __FILE__)
class TestTimeout < Test::Unit::TestCase
def test_op_timeout

View File

@ -1,4 +1,4 @@
require './test/test_helper'
require File.expand_path("../../test_helper", __FILE__)
class CollectionTest < Test::Unit::TestCase

View File

@ -1,4 +1,4 @@
require './test/test_helper'
require File.expand_path("../../test_helper", __FILE__)
include Mongo
class ConnectionTest < Test::Unit::TestCase

View File

@ -1,4 +1,4 @@
require './test/test_helper'
require File.expand_path("../../test_helper", __FILE__)
class CursorTest < Test::Unit::TestCase
context "Cursor options" do

View File

@ -1,4 +1,4 @@
require './test/test_helper'
require File.expand_path("../../test_helper", __FILE__)
def insert_message(db, documents)
documents = [documents] unless documents.is_a?(Array)

View File

@ -1,4 +1,4 @@
require './test/test_helper'
require File.expand_path("../../test_helper", __FILE__)
class GridTest < Test::Unit::TestCase

View File

@ -1,4 +1,4 @@
require './test/test_helper'
require File.expand_path("../../test_helper", __FILE__)
class NodeTest < Test::Unit::TestCase

View File

@ -1,4 +1,4 @@
require './test/test_helper'
require File.expand_path("../../test_helper", __FILE__)
include Mongo
class PoolManagerTest < Test::Unit::TestCase

View File

@ -1,4 +1,4 @@
require './test/test_helper'
require File.expand_path("../../test_helper", __FILE__)
include Mongo
class PoolTest < Test::Unit::TestCase

View File

@ -1,4 +1,4 @@
require './test/test_helper'
require File.expand_path("../../test_helper", __FILE__)
class ReadTest < Test::Unit::TestCase

View File

@ -1,4 +1,4 @@
require './test/test_helper'
require File.expand_path("../../test_helper", __FILE__)
class SafeTest < Test::Unit::TestCase

View File

@ -1,4 +1,4 @@
require './test/test_helper'
require File.expand_path("../test_helper", __FILE__)
class URITest < Test::Unit::TestCase
include Mongo