Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

use Bundler to bootstrap testing dependencies

  • Loading branch information...
commit bfbdc5b5314076574a797106a7551278bf86ebe7 1 parent 01f04f3
@mislav authored
View
19 Gemfile
@@ -0,0 +1,19 @@
+rails_dir = '/Users/mislav/.coral/rails-rails'
+if File.directory? rails_dir
+ path rails_dir
+else
+ git 'git://github.com/rails/rails.git'
+end
+source :gemcutter
+
+gem 'activerecord', '~> 3.0.pre'
+gem 'activeresource', '~> 3.0.pre'
+gem 'actionpack', '~> 3.0.pre'
+gem 'sequel', '~> 3.8.0'
+gem 'rspec', '~> 1.3.0'
+gem 'mocha', '~> 0.9.8'
+gem 'sqlite3-ruby', '~> 1.2.5'
+gem 'dm-core', '~> 0.10.2'
+gem 'do_sqlite3', '~> 0.10.1.1'
+gem 'mysql', '~> 2.8.1'
+gem 'pg', '~> 0.8.0'
View
3  spec/finders/active_record_spec.rb
@@ -1,9 +1,9 @@
require 'spec_helper'
require 'will_paginate/finders/active_record'
-require File.dirname(__FILE__) + '/activerecord_test_connector'
require 'will_paginate'
WillPaginate::enable_named_scope
+require File.expand_path('../activerecord_test_connector', __FILE__)
class ArProject < ActiveRecord::Base
def self.column_names
@@ -13,7 +13,6 @@ def self.column_names
named_scope :distinct, :select => "DISTINCT #{table_name}.*"
end
-gem 'sqlite3-ruby'
ActiverecordTestConnector.setup
describe WillPaginate::Finders::ActiveRecord do
View
4 spec/finders/activerecord_test_connector.rb
@@ -7,7 +7,7 @@ class ActiverecordTestConnector
cattr_accessor :able_to_connect
cattr_accessor :connected
- FIXTURES_PATH = File.join(File.dirname(__FILE__), '..', 'fixtures')
+ FIXTURES_PATH = File.expand_path('../../fixtures', __FILE__)
# Set our defaults
self.connected = false
@@ -35,7 +35,7 @@ def self.add_load_path(path)
def self.setup_connection
db = ENV['DB'].blank?? 'sqlite3' : ENV['DB']
- configurations = YAML.load_file(File.join(File.dirname(__FILE__), '..', 'database.yml'))
+ configurations = YAML.load_file(File.expand_path('../../database.yml', __FILE__))
raise "no configuration for '#{db}'" unless configurations.key? db
configuration = configurations[db]
View
2  spec/finders/data_mapper_spec.rb
@@ -1,6 +1,6 @@
require 'spec_helper'
require 'will_paginate/finders/data_mapper'
-require File.dirname(__FILE__) + '/data_mapper_test_connector'
+require File.expand_path('../data_mapper_test_connector', __FILE__)
require 'will_paginate'
View
2  spec/finders/sequel_spec.rb
@@ -1,6 +1,6 @@
require 'spec_helper'
require 'will_paginate/finders/sequel'
-require File.dirname(__FILE__) + '/sequel_test_connector'
+require File.expand_path('../sequel_test_connector', __FILE__)
describe Sequel::Dataset::Pagination, 'extension' do
View
2  spec/spec_helper.rb
@@ -1,4 +1,4 @@
-require 'spec'
+require 'spec/autorun'
module MyExtras
protected
Please sign in to comment.
Something went wrong with that request. Please try again.