Skip to content

Commit

Permalink
upgrade to RSpec2
Browse files Browse the repository at this point in the history
  • Loading branch information
stanislaw authored and bmabey committed Jul 9, 2012
1 parent 5381eab commit ee08c30
Show file tree
Hide file tree
Showing 19 changed files with 73 additions and 48 deletions.
4 changes: 4 additions & 0 deletions .rspec
@@ -0,0 +1,4 @@
--color
--format documentation
mtime
--backtrace
2 changes: 1 addition & 1 deletion .rvmrc
@@ -1 +1 @@
rvm ruby-1.8.7-p248
rvm 1.8.7
5 changes: 4 additions & 1 deletion Gemfile
Expand Up @@ -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"
Expand Down
58 changes: 37 additions & 21 deletions Gemfile.lock
Expand Up @@ -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)
Expand Down Expand Up @@ -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)
Expand All @@ -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)
Expand All @@ -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)
Expand All @@ -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)
Expand All @@ -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
Expand All @@ -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
Expand Down
16 changes: 8 additions & 8 deletions Rakefile
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion examples/features/support/env.rb
Expand Up @@ -5,7 +5,7 @@
require 'bundler'

Bundler.setup
require 'spec/expectations'
require 'rspec/expectations'
require 'ruby-debug'

DB_DIR = "#{File.dirname(__FILE__)}/../../db"
Expand Down
2 changes: 1 addition & 1 deletion features/support/env.rb
@@ -1,7 +1,7 @@
$LOAD_PATH.unshift(File.dirname(__FILE__) + '/../../lib')
require 'database_cleaner'

require 'spec/expectations'
require 'rspec/expectations'

require 'test/unit/assertions'

2 changes: 1 addition & 1 deletion spec/database_cleaner/active_record/base_spec.rb
@@ -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
Expand Down
4 changes: 2 additions & 2 deletions spec/database_cleaner/configuration_spec.rb
@@ -1,4 +1,4 @@
require File.dirname(__FILE__) + '/../spec_helper'
require 'spec_helper'

module DatabaseCleaner
class << self
Expand Down Expand Up @@ -197,7 +197,7 @@ def connections_stub!(array)
# 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
Expand Down
2 changes: 1 addition & 1 deletion spec/database_cleaner/data_mapper/base_spec.rb
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion spec/database_cleaner/data_mapper/transaction_spec.rb
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion spec/database_cleaner/data_mapper/truncation_spec.rb
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion spec/database_cleaner/generic/base_spec.rb
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion spec/database_cleaner/mongo_mapper/base_spec.rb
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion spec/database_cleaner/sequel/base_spec.rb
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion spec/database_cleaner/sequel/transaction_spec.rb
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion spec/database_cleaner/sequel/truncation_spec.rb
@@ -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
Expand Down
File renamed without changes.
10 changes: 6 additions & 4 deletions spec/spec_helper.rb
Expand Up @@ -3,16 +3,18 @@
require "bundler"
Bundler.setup

require 'rspec/core'
require 'rspec/mocks'

require 'spec'
#require 'active_record'
#require 'mongo_mapper'
$:.unshift(File.dirname(__FILE__) + '/../lib')
require 'database_cleaner'

$:.unshift(File.dirname(__FILE__))
$:.unshift(File.dirname(__FILE__) + '/../lib')

require 'database_cleaner'

Spec::Runner.configure do |config|
RSpec.configure do |config|

end

Expand Down

0 comments on commit ee08c30

Please sign in to comment.