mirror of
https://github.com/DatabaseCleaner/database_cleaner
synced 2023-03-27 23:22:03 -04:00
upgrade to RSpec2
This commit is contained in:
parent
5381eab37c
commit
ee08c30de7
19 changed files with 73 additions and 48 deletions
4
.rspec
Normal file
4
.rspec
Normal file
|
@ -0,0 +1,4 @@
|
|||
--color
|
||||
--format documentation
|
||||
mtime
|
||||
--backtrace
|
2
.rvmrc
2
.rvmrc
|
@ -1 +1 @@
|
|||
rvm ruby-1.8.7-p248
|
||||
rvm 1.8.7
|
||||
|
|
5
Gemfile
5
Gemfile
|
@ -34,10 +34,13 @@ group :development do
|
|||
gem "couch_potato", "0.3.0"
|
||||
gem "sequel", "~>3.21.0"
|
||||
#gem "ibm_db" # I don't want to add this dependency, even as a dev one since it requires DB2 to be installed
|
||||
gem 'mysql'
|
||||
gem 'mysql2', '~> 0.2.0'
|
||||
gem 'pg'
|
||||
end
|
||||
|
||||
group :test do
|
||||
gem "rspec"
|
||||
gem "rspec-rails"
|
||||
gem "rspactor"
|
||||
gem "rcov"
|
||||
gem "ZenTest"
|
||||
|
|
58
Gemfile.lock
58
Gemfile.lock
|
@ -5,24 +5,24 @@ GEM
|
|||
activerecord (2.3.8)
|
||||
activesupport (= 2.3.8)
|
||||
activesupport (2.3.8)
|
||||
addressable (2.2.0)
|
||||
bson (1.0.4)
|
||||
addressable (2.2.8)
|
||||
bson (1.0.9)
|
||||
builder (2.1.2)
|
||||
columnize (0.3.1)
|
||||
couch_potato (0.3.0)
|
||||
couchrest (>= 0.24)
|
||||
json
|
||||
couchrest (1.0.1)
|
||||
json (>= 1.4.6)
|
||||
mime-types (>= 1.15)
|
||||
rest-client (>= 1.5.1)
|
||||
couchrest (1.1.2)
|
||||
mime-types (~> 1.15)
|
||||
multi_json (~> 1.0.0)
|
||||
rest-client (~> 1.6.1)
|
||||
cucumber (0.8.5)
|
||||
builder (~> 2.1.2)
|
||||
diff-lcs (~> 1.1.2)
|
||||
gherkin (~> 2.1.4)
|
||||
json_pure (~> 1.4.3)
|
||||
term-ansicolor (~> 1.0.4)
|
||||
data_objects (0.10.2)
|
||||
data_objects (0.10.8)
|
||||
addressable (~> 2.1)
|
||||
datamapper (1.0.0)
|
||||
dm-aggregates (= 1.0.0)
|
||||
|
@ -68,11 +68,11 @@ GEM
|
|||
uuidtools (~> 2.1.1)
|
||||
dm-validations (1.0.0)
|
||||
dm-core (~> 1.0.0)
|
||||
do_sqlite3 (0.10.2)
|
||||
data_objects (= 0.10.2)
|
||||
do_sqlite3 (0.10.8)
|
||||
data_objects (= 0.10.8)
|
||||
durran-validatable (2.0.1)
|
||||
extlib (0.9.15)
|
||||
fastercsv (1.5.3)
|
||||
fastercsv (1.5.5)
|
||||
ffi (0.6.3)
|
||||
rake (>= 0.8.7)
|
||||
gemcutter (0.6.1)
|
||||
|
@ -86,14 +86,14 @@ GEM
|
|||
rubyforge (>= 2.0.0)
|
||||
jnunemaker-validatable (1.8.4)
|
||||
activesupport (>= 2.3.4)
|
||||
json (1.4.6)
|
||||
json (1.7.3)
|
||||
json_pure (1.4.6)
|
||||
libnotify (0.2.0)
|
||||
ffi (>= 0.6.2)
|
||||
linecache (0.43)
|
||||
mime-types (1.16)
|
||||
mongo (1.0.7)
|
||||
bson (>= 1.0.4)
|
||||
mime-types (1.19)
|
||||
mongo (1.0.9)
|
||||
bson (>= 1.0.5)
|
||||
mongo_mapper (0.8.2)
|
||||
activesupport (>= 2.3.4)
|
||||
jnunemaker-validatable (~> 1.8.4)
|
||||
|
@ -104,13 +104,17 @@ GEM
|
|||
durran-validatable (>= 2.0.1)
|
||||
mongo (~> 1.0.1)
|
||||
will_paginate (< 2.9)
|
||||
plucky (0.3.4)
|
||||
mongo (~> 1.0.7)
|
||||
multi_json (1.0.4)
|
||||
mysql (2.8.1)
|
||||
mysql2 (0.2.18)
|
||||
pg (0.14.0)
|
||||
plucky (0.3.5)
|
||||
mongo (~> 1.0.8)
|
||||
rake (0.8.7)
|
||||
rb-inotify (0.8.1)
|
||||
ffi (>= 0.5.0)
|
||||
rcov (0.9.8)
|
||||
rest-client (1.6.0)
|
||||
rest-client (1.6.7)
|
||||
mime-types (>= 1.16)
|
||||
rspactor (0.7.0.beta.6)
|
||||
bundler (>= 1.0.0.rc.5)
|
||||
|
@ -119,7 +123,16 @@ GEM
|
|||
rb-inotify
|
||||
sys-uname (>= 0.8.4)
|
||||
trollop (>= 1.16.2)
|
||||
rspec (1.3.0)
|
||||
rspec (2.1.0)
|
||||
rspec-core (~> 2.1.0)
|
||||
rspec-expectations (~> 2.1.0)
|
||||
rspec-mocks (~> 2.1.0)
|
||||
rspec-core (2.1.0)
|
||||
rspec-expectations (2.1.0)
|
||||
diff-lcs (~> 1.1.2)
|
||||
rspec-mocks (2.1.0)
|
||||
rspec-rails (2.1.0)
|
||||
rspec (~> 2.1.0)
|
||||
ruby-debug (0.10.3)
|
||||
columnize (>= 0.1)
|
||||
ruby-debug-base (~> 0.10.3.0)
|
||||
|
@ -134,8 +147,8 @@ GEM
|
|||
term-ansicolor (1.0.5)
|
||||
trollop (1.16.2)
|
||||
tzinfo (0.3.22)
|
||||
uuidtools (2.1.1)
|
||||
will_paginate (2.3.14)
|
||||
uuidtools (2.1.2)
|
||||
will_paginate (2.3.16)
|
||||
|
||||
PLATFORMS
|
||||
ruby
|
||||
|
@ -153,10 +166,13 @@ DEPENDENCIES
|
|||
json_pure
|
||||
mongo_mapper (= 0.8.2)
|
||||
mongoid (= 1.9.1)
|
||||
mysql
|
||||
mysql2 (~> 0.2.0)
|
||||
pg
|
||||
rake
|
||||
rcov
|
||||
rspactor
|
||||
rspec
|
||||
rspec-rails
|
||||
ruby-debug
|
||||
sequel (~> 3.21.0)
|
||||
sqlite3-ruby
|
||||
|
|
16
Rakefile
16
Rakefile
|
@ -28,16 +28,16 @@ Rake::RDocTask.new do |rdoc|
|
|||
rdoc.rdoc_files.include('lib/**/*.rb')
|
||||
end
|
||||
|
||||
require 'spec/rake/spectask'
|
||||
Spec::Rake::SpecTask.new(:spec) do |t|
|
||||
t.libs << 'lib' << 'spec'
|
||||
t.spec_files = FileList['spec/**/*_spec.rb']
|
||||
|
||||
require 'rspec/core'
|
||||
require 'rspec/core/rake_task'
|
||||
RSpec::Core::RakeTask.new(:spec) do |spec|
|
||||
spec.pattern = FileList['spec/**/*_spec.rb']
|
||||
end
|
||||
|
||||
Spec::Rake::SpecTask.new(:rcov) do |t|
|
||||
t.libs << 'lib' << 'spec'
|
||||
t.spec_files = FileList['spec/**/*_spec.rb']
|
||||
t.rcov = true
|
||||
RSpec::Core::RakeTask.new(:rcov) do |spec|
|
||||
spec.pattern = 'spec/**/*_spec.rb'
|
||||
spec.rcov = true
|
||||
end
|
||||
|
||||
begin
|
||||
|
|
|
@ -5,7 +5,7 @@ require 'rubygems'
|
|||
require 'bundler'
|
||||
|
||||
Bundler.setup
|
||||
require 'spec/expectations'
|
||||
require 'rspec/expectations'
|
||||
require 'ruby-debug'
|
||||
|
||||
DB_DIR = "#{File.dirname(__FILE__)}/../../db"
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
$LOAD_PATH.unshift(File.dirname(__FILE__) + '/../../lib')
|
||||
require 'database_cleaner'
|
||||
|
||||
require 'spec/expectations'
|
||||
require 'rspec/expectations'
|
||||
|
||||
require 'test/unit/assertions'
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
require 'spec_helper'
|
||||
require 'active_record'
|
||||
require 'database_cleaner/active_record/base'
|
||||
require 'database_cleaner/shared_strategy_spec'
|
||||
require 'database_cleaner/shared_strategy'
|
||||
|
||||
module DatabaseCleaner
|
||||
describe ActiveRecord do
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
require File.dirname(__FILE__) + '/../spec_helper'
|
||||
require 'spec_helper'
|
||||
|
||||
module DatabaseCleaner
|
||||
class << self
|
||||
|
@ -197,7 +197,7 @@ describe ::DatabaseCleaner do
|
|||
# plausably want to force orm/strategy change on two sets of orm that differ only on db
|
||||
context "multiple orm proxy methods" do
|
||||
|
||||
it "should proxy orm to all connections and remove duplicate connections" do
|
||||
pending "should proxy orm to all connections and remove duplicate connections" do
|
||||
active_record_1 = mock("active_mock_on_db_one").as_null_object
|
||||
active_record_2 = mock("active_mock_on_db_two").as_null_object
|
||||
data_mapper_1 = mock("data_mock_on_db_one").as_null_object
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
require 'spec_helper'
|
||||
require 'database_cleaner/data_mapper/base'
|
||||
require 'database_cleaner/shared_strategy_spec'
|
||||
require 'database_cleaner/shared_strategy'
|
||||
|
||||
module DatabaseCleaner
|
||||
describe DataMapper do
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
require File.dirname(__FILE__) + '/../../spec_helper'
|
||||
require 'database_cleaner/data_mapper/transaction'
|
||||
require 'database_cleaner/shared_strategy_spec'
|
||||
require 'database_cleaner/shared_strategy'
|
||||
#require 'data_mapper'
|
||||
|
||||
module DatabaseCleaner
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
require 'database_cleaner/data_mapper/truncation'
|
||||
require 'database_cleaner/shared_strategy_spec'
|
||||
require 'database_cleaner/shared_strategy'
|
||||
|
||||
module DatabaseCleaner
|
||||
module DataMapper
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
require 'spec_helper'
|
||||
require 'database_cleaner/shared_strategy_spec'
|
||||
require 'database_cleaner/shared_strategy'
|
||||
require 'database_cleaner/generic/base'
|
||||
|
||||
module ::DatabaseCleaner
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
require 'spec_helper'
|
||||
require 'database_cleaner/mongo_mapper/base'
|
||||
require 'database_cleaner/shared_strategy_spec'
|
||||
require 'database_cleaner/shared_strategy'
|
||||
|
||||
module DatabaseCleaner
|
||||
describe MongoMapper do
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
require 'spec_helper'
|
||||
require 'database_cleaner/sequel/base'
|
||||
require 'database_cleaner/shared_strategy_spec'
|
||||
require 'database_cleaner/shared_strategy'
|
||||
require 'sequel'
|
||||
|
||||
module DatabaseCleaner
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
require 'spec_helper'
|
||||
require 'database_cleaner/sequel/transaction'
|
||||
require 'database_cleaner/shared_strategy_spec'
|
||||
require 'database_cleaner/shared_strategy'
|
||||
require 'sequel'
|
||||
|
||||
module DatabaseCleaner
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
require 'spec_helper'
|
||||
require 'database_cleaner/sequel/truncation'
|
||||
require 'database_cleaner/shared_strategy_spec'
|
||||
require 'database_cleaner/shared_strategy'
|
||||
require 'sequel'
|
||||
|
||||
module DatabaseCleaner
|
||||
|
|
|
@ -3,16 +3,18 @@ require "rubygems"
|
|||
require "bundler"
|
||||
Bundler.setup
|
||||
|
||||
require 'rspec/core'
|
||||
require 'rspec/mocks'
|
||||
|
||||
require 'spec'
|
||||
#require 'active_record'
|
||||
#require 'mongo_mapper'
|
||||
|
||||
$:.unshift(File.dirname(__FILE__))
|
||||
$:.unshift(File.dirname(__FILE__) + '/../lib')
|
||||
|
||||
require 'database_cleaner'
|
||||
|
||||
|
||||
|
||||
Spec::Runner.configure do |config|
|
||||
RSpec.configure do |config|
|
||||
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in a new issue