Skip to content

Commit

Permalink
[Gary] require test_helper edits to work everywhere including via IDE…
Browse files Browse the repository at this point in the history
… (RubyMine), Gemfile for JRuby
  • Loading branch information
Gary Murakami committed Apr 11, 2012
1 parent 4ca05fe commit 64c87e9
Show file tree
Hide file tree
Showing 47 changed files with 49 additions and 47 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Expand Up @@ -21,3 +21,5 @@ test/load/thin/config.yml
test/tools/data/
.rvmrc
Gemfile.lock
.idea/*

4 changes: 2 additions & 2 deletions Gemfile
Expand Up @@ -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"
Expand All @@ -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
Expand Down
2 changes: 1 addition & 1 deletion test/auxillary/1.4_features.rb
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion test/auxillary/authentication_test.rb
@@ -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.
Expand Down
2 changes: 1 addition & 1 deletion test/auxillary/autoreconnect_test.rb
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion test/auxillary/fork_test.rb
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion test/auxillary/repl_set_auth_test.rb
@@ -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'

Expand Down
2 changes: 1 addition & 1 deletion test/auxillary/slave_connection_test.rb
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion test/auxillary/threaded_authentication_test.rb
Expand Up @@ -2,7 +2,7 @@
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.
Expand Down
2 changes: 1 addition & 1 deletion test/bson/binary_test.rb
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion test/bson/bson_test.rb
@@ -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'
Expand Down
2 changes: 1 addition & 1 deletion test/bson/byte_buffer_test.rb
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion test/bson/hash_with_indifferent_access_test.rb
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion test/bson/json_test.rb
@@ -1,4 +1,4 @@
require './test/bson/test_helper'
require File.expand_path("../test_helper", __FILE__)
require 'rubygems'
require 'json'

Expand Down
2 changes: 1 addition & 1 deletion test/bson/object_id_test.rb
@@ -1,4 +1,4 @@
require './test/bson/test_helper'
require File.expand_path("../test_helper", __FILE__)
require 'rubygems'
require 'json'

Expand Down
2 changes: 1 addition & 1 deletion test/bson/ordered_hash_test.rb
@@ -1,4 +1,4 @@
require './test/bson/test_helper'
require File.expand_path("../test_helper", __FILE__)

class OrderedHashTest < Test::Unit::TestCase

Expand Down
2 changes: 1 addition & 1 deletion test/bson/timestamp_test.rb
@@ -1,4 +1,4 @@
require './test/bson/test_helper'
require File.expand_path("../test_helper", __FILE__)

class TimestampTest < Test::Unit::TestCase

Expand Down
2 changes: 1 addition & 1 deletion test/collection_test.rb
@@ -1,4 +1,4 @@
require './test/test_helper'
require File.expand_path("../test_helper", __FILE__)
require 'rbconfig'

class TestCollection < Test::Unit::TestCase
Expand Down
2 changes: 1 addition & 1 deletion test/connection_test.rb
@@ -1,4 +1,4 @@
require './test/test_helper'
require File.expand_path("../test_helper", __FILE__)
require 'logger'
require 'stringio'
require 'thread'
Expand Down
2 changes: 1 addition & 1 deletion test/conversions_test.rb
@@ -1,4 +1,4 @@
require './test/test_helper'
require File.expand_path("../test_helper", __FILE__)
require 'mongo/exceptions'
require 'mongo/util/conversions'

Expand Down
2 changes: 1 addition & 1 deletion test/cursor_fail_test.rb
@@ -1,4 +1,4 @@
require './test/test_helper'
require File.expand_path("../test_helper", __FILE__)
require 'logger'

class CursorFailTest < Test::Unit::TestCase
Expand Down
2 changes: 1 addition & 1 deletion test/cursor_message_test.rb
@@ -1,4 +1,4 @@
require './test/test_helper'
require File.expand_path("../test_helper", __FILE__)
require 'logger'

class CursorMessageTest < Test::Unit::TestCase
Expand Down
2 changes: 1 addition & 1 deletion test/cursor_test.rb
@@ -1,4 +1,4 @@
require './test/test_helper'
require File.expand_path("../test_helper", __FILE__)
require 'logger'

class CursorTest < Test::Unit::TestCase
Expand Down
2 changes: 1 addition & 1 deletion test/db_api_test.rb
@@ -1,4 +1,4 @@
require './test/test_helper'
require File.expand_path("../test_helper", __FILE__)

class DBAPITest < Test::Unit::TestCase
include Mongo
Expand Down
2 changes: 1 addition & 1 deletion test/db_connection_test.rb
@@ -1,4 +1,4 @@
require './test/test_helper'
require File.expand_path("../test_helper", __FILE__)

class DBConnectionTest < Test::Unit::TestCase

Expand Down
2 changes: 1 addition & 1 deletion test/db_test.rb
@@ -1,4 +1,4 @@
require './test/test_helper'
require File.expand_path("../test_helper", __FILE__)
require 'digest/md5'
require 'stringio'
require 'logger'
Expand Down
2 changes: 1 addition & 1 deletion test/grid_file_system_test.rb
@@ -1,4 +1,4 @@
require './test/test_helper'
require File.expand_path("../test_helper", __FILE__)

class GridFileSystemTest < Test::Unit::TestCase
context "GridFileSystem:" do
Expand Down
2 changes: 1 addition & 1 deletion test/grid_io_test.rb
@@ -1,4 +1,4 @@
require './test/test_helper'
require File.expand_path("../test_helper", __FILE__)

class GridIOTest < Test::Unit::TestCase

Expand Down
2 changes: 1 addition & 1 deletion test/grid_test.rb
@@ -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={})
Expand Down
2 changes: 1 addition & 1 deletion test/pool_test.rb
@@ -1,4 +1,4 @@
require './test/test_helper'
require File.expand_path("../test_helper", __FILE__)
require 'thread'

class PoolTest < Test::Unit::TestCase
Expand Down
2 changes: 1 addition & 1 deletion test/replica_sets/rs_test_helper.rb
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion test/safe_test.rb
@@ -1,4 +1,4 @@
require './test/test_helper'
require File.expand_path("../test_helper", __FILE__)
include Mongo

class SafeTest < Test::Unit::TestCase
Expand Down
2 changes: 1 addition & 1 deletion test/support_test.rb
@@ -1,4 +1,4 @@
require './test/test_helper'
require File.expand_path("../test_helper", __FILE__)

class SupportTest < Test::Unit::TestCase

Expand Down
2 changes: 1 addition & 1 deletion test/threading/threading_with_large_pool_test.rb
@@ -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.
Expand Down
2 changes: 1 addition & 1 deletion test/threading_test.rb
@@ -1,4 +1,4 @@
require './test/test_helper'
require File.expand_path("../test_helper", __FILE__)

class TestThreading < Test::Unit::TestCase

Expand Down
2 changes: 1 addition & 1 deletion test/timeout_test.rb
@@ -1,4 +1,4 @@
require './test/test_helper'
require File.expand_path("../test_helper", __FILE__)

class TestTimeout < Test::Unit::TestCase
def test_op_timeout
Expand Down
2 changes: 1 addition & 1 deletion test/unit/collection_test.rb
@@ -1,4 +1,4 @@
require './test/test_helper'
require File.expand_path("../../test_helper", __FILE__)

class CollectionTest < Test::Unit::TestCase

Expand Down
2 changes: 1 addition & 1 deletion test/unit/connection_test.rb
@@ -1,4 +1,4 @@
require './test/test_helper'
require File.expand_path("../../test_helper", __FILE__)
include Mongo

class ConnectionTest < Test::Unit::TestCase
Expand Down
2 changes: 1 addition & 1 deletion test/unit/cursor_test.rb
@@ -1,4 +1,4 @@
require './test/test_helper'
require File.expand_path("../../test_helper", __FILE__)

class CursorTest < Test::Unit::TestCase
context "Cursor options" do
Expand Down
2 changes: 1 addition & 1 deletion test/unit/db_test.rb
@@ -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)
Expand Down
2 changes: 1 addition & 1 deletion test/unit/grid_test.rb
@@ -1,4 +1,4 @@
require './test/test_helper'
require File.expand_path("../../test_helper", __FILE__)

class GridTest < Test::Unit::TestCase

Expand Down
2 changes: 1 addition & 1 deletion test/unit/node_test.rb
@@ -1,4 +1,4 @@
require './test/test_helper'
require File.expand_path("../../test_helper", __FILE__)

class NodeTest < Test::Unit::TestCase

Expand Down
2 changes: 1 addition & 1 deletion test/unit/pool_manager_test.rb
@@ -1,4 +1,4 @@
require './test/test_helper'
require File.expand_path("../../test_helper", __FILE__)
include Mongo

class PoolManagerTest < Test::Unit::TestCase
Expand Down
2 changes: 1 addition & 1 deletion test/unit/pool_test.rb
@@ -1,4 +1,4 @@
require './test/test_helper'
require File.expand_path("../../test_helper", __FILE__)
include Mongo

class PoolTest < Test::Unit::TestCase
Expand Down
2 changes: 1 addition & 1 deletion test/unit/read_test.rb
@@ -1,4 +1,4 @@
require './test/test_helper'
require File.expand_path("../../test_helper", __FILE__)

class ReadTest < Test::Unit::TestCase

Expand Down
2 changes: 1 addition & 1 deletion test/unit/safe_test.rb
@@ -1,4 +1,4 @@
require './test/test_helper'
require File.expand_path("../../test_helper", __FILE__)

class SafeTest < Test::Unit::TestCase

Expand Down
2 changes: 1 addition & 1 deletion test/uri_test.rb
@@ -1,4 +1,4 @@
require './test/test_helper'
require File.expand_path("../test_helper", __FILE__)

class URITest < Test::Unit::TestCase
include Mongo
Expand Down

0 comments on commit 64c87e9

Please sign in to comment.