Skip to content
This repository has been archived by the owner on Jan 1, 2024. It is now read-only.

Commit

Permalink
Add minitest/unit via shims for test/unit.
Browse files Browse the repository at this point in the history
* Specify minitest ~>4.2.0 for rails < 4 to avoid breaking changes.
* Peg mocha/minitest to old versions for cross-compatibility with ActiveSupport.
* Conditionally require mocha integration for different versions of ruby: http://jamesmead.org/blog/2009-02-02-test-unit-and-minitest-with-different-ruby-versions
  • Loading branch information
phillbaker committed Apr 29, 2014
1 parent 8adf50f commit 0f2f78f
Show file tree
Hide file tree
Showing 15 changed files with 60 additions and 74 deletions.
9 changes: 9 additions & 0 deletions Appraisals
Original file line number Diff line number Diff line change
@@ -1,27 +1,36 @@
appraise "rails2" do
gem "rails", "~>2.3.8"
gem "passenger", "~>2.0"
gem "mocha", "~> 0.10.5", :require=>false
gem "minitest", "~>4.2.0"
end

appraise "rails3" do
gem "mocha", "~> 0.12.8", :require=>false
gem "minitest", "~>4.2.0"
gem "rails", "3.0.11"
gem "fastthread", :git => "git://github.com/zoltankiss/fastthread.git", :platforms => :mri_20
gem "passenger", "~>3.0"
end

appraise "rails31" do
gem "mocha", "~>0.12.8", :require=>false
gem "minitest", "~>4.2.0"
gem "rails", "3.1.3"
gem "fastthread", :git => "git://github.com/zoltankiss/fastthread.git", :platforms => :mri_20
gem "passenger", "~>3.0"
end

appraise "rails32" do
gem "mocha", "~> 0.12.8", :require=>false
gem "minitest", "~>4.2.0"
gem "rails", "3.2.1"
gem "fastthread", :git => "git://github.com/zoltankiss/fastthread.git", :platforms => :mri_20
gem "passenger", "~>3.0"
end

appraise "rails4" do
gem "mocha", "~> 1.0", :require=>false
gem "rails", "4.0.0"
gem "fastthread", :git => "git://github.com/zoltankiss/fastthread.git", :platforms => :mri_20
gem "passenger", "~>3.0"
Expand Down
2 changes: 0 additions & 2 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,6 @@ gem "garb"
gem "SystemTimer", "1.2.3", :platforms => :mri_18

# Testing
gem "mocha", :require=>false
gem "shoulda", :require=>false # Requires test/unit
gem "timecop", :require=>false
gem "webmock", :require=>false

Expand Down
12 changes: 2 additions & 10 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,7 @@ GEM
liquid (2.3.0)
maruku (0.6.0)
syntax (>= 1.0.0)
metaclass (0.0.1)
mocha (0.10.5)
metaclass (~> 0.0.1)
minitest (4.7.5)
mongo (1.6.0)
bson (= 1.6.0)
posix-spawn (0.3.6)
Expand All @@ -52,11 +50,6 @@ GEM
redis-namespace (1.3.2)
redis (~> 3.0.4)
rubystats (0.2.3)
shoulda (3.0.1)
shoulda-context (~> 1.0.0)
shoulda-matchers (~> 1.0.0)
shoulda-context (1.0.0)
shoulda-matchers (1.0.0)
sqlite3 (1.3.8)
syntax (1.0.0)
thor (0.18.1)
Expand All @@ -79,14 +72,13 @@ DEPENDENCIES
garb
integration
jekyll
mocha
minitest (>= 4.2)
mongo
rack
rake
redis (>= 2.1)
redis-namespace (>= 1.1.0)
rubystats
shoulda
sqlite3
timecop
vanity!
Expand Down
4 changes: 2 additions & 2 deletions gemfiles/rails2.gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,12 @@ gem "integration"
gem "rubystats"
gem "garb"
gem "SystemTimer", "1.2.3", :platforms=>:mri_18
gem "mocha", :require=>false
gem "shoulda", :require=>false
gem "timecop", :require=>false
gem "webmock", :require=>false
gem "rails", "~>2.3.8"
gem "passenger", "~>2.0"
gem "mocha", "~> 0.10.5", :require=>false
gem "minitest", "~>4.2.0"

group :development do
gem "appraisal", ">= 1.0.0.beta2"
Expand Down
12 changes: 4 additions & 8 deletions gemfiles/rails2.gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,8 @@ GEM
rb-kqueue (>= 0.2)
maruku (0.7.0)
metaclass (0.0.4)
mocha (1.0.0)
minitest (4.2.0)
mocha (0.10.5)
metaclass (~> 0.0.1)
mongo (1.10.0)
bson (~> 1.10.0)
Expand Down Expand Up @@ -96,11 +97,6 @@ GEM
redis (~> 3.0.4)
rubystats (0.2.3)
safe_yaml (1.0.3)
shoulda (3.0.1)
shoulda-context (~> 1.0.0)
shoulda-matchers (~> 1.0.0)
shoulda-context (1.0.2)
shoulda-matchers (1.0.0)
sqlite3 (1.3.9)
thor (0.19.1)
timecop (0.3.5)
Expand All @@ -125,7 +121,8 @@ DEPENDENCIES
garb
integration
jekyll
mocha
minitest (~> 4.2.0)
mocha (~> 0.10.5)
mongo
passenger (~> 2.0)
rack
Expand All @@ -134,7 +131,6 @@ DEPENDENCIES
redis (>= 2.1)
redis-namespace (>= 1.1.0)
rubystats
shoulda
sqlite3
timecop
vanity!
Expand Down
4 changes: 2 additions & 2 deletions gemfiles/rails3.gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@ gem "integration"
gem "rubystats"
gem "garb"
gem "SystemTimer", "1.2.3", :platforms=>:mri_18
gem "mocha", :require=>false
gem "shoulda", :require=>false
gem "timecop", :require=>false
gem "webmock", :require=>false
gem "mocha", "~> 0.12.8", :require=>false
gem "minitest", "~>4.2.0"
gem "rails", "3.0.11"
gem "fastthread", :git=>"git://github.com/zoltankiss/fastthread.git", :platforms=>:mri_20
gem "passenger", "~>3.0"
Expand Down
14 changes: 5 additions & 9 deletions gemfiles/rails3.gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -84,9 +84,10 @@ GEM
treetop (~> 1.4.8)
maruku (0.6.0)
syntax (>= 1.0.0)
metaclass (0.0.1)
metaclass (0.0.4)
mime-types (1.17.2)
mocha (0.10.5)
minitest (4.2.0)
mocha (0.12.10)
metaclass (~> 0.0.1)
mongo (1.6.0)
bson (= 1.6.0)
Expand Down Expand Up @@ -123,11 +124,6 @@ GEM
redis-namespace (1.3.2)
redis (~> 3.0.4)
rubystats (0.2.3)
shoulda (3.0.1)
shoulda-context (~> 1.0.0)
shoulda-matchers (~> 1.0.0)
shoulda-context (1.0.0)
shoulda-matchers (1.0.0)
sqlite3 (1.3.8)
syntax (1.0.0)
thor (0.14.6)
Expand Down Expand Up @@ -155,7 +151,8 @@ DEPENDENCIES
garb
integration
jekyll
mocha
minitest (~> 4.2.0)
mocha (~> 0.12.8)
mongo
passenger (~> 3.0)
rack
Expand All @@ -164,7 +161,6 @@ DEPENDENCIES
redis (>= 2.1)
redis-namespace (>= 1.1.0)
rubystats
shoulda
sqlite3
timecop
vanity!
Expand Down
4 changes: 2 additions & 2 deletions gemfiles/rails31.gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@ gem "integration"
gem "rubystats"
gem "garb"
gem "SystemTimer", "1.2.3", :platforms=>:mri_18
gem "mocha", :require=>false
gem "shoulda", :require=>false
gem "timecop", :require=>false
gem "webmock", :require=>false
gem "mocha", "~>0.12.8", :require=>false
gem "minitest", "~>4.2.0"
gem "rails", "3.1.3"
gem "fastthread", :git=>"git://github.com/zoltankiss/fastthread.git", :platforms=>:mri_20
gem "passenger", "~>3.0"
Expand Down
14 changes: 5 additions & 9 deletions gemfiles/rails31.gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -83,9 +83,10 @@ GEM
treetop (~> 1.4.8)
maruku (0.6.0)
syntax (>= 1.0.0)
metaclass (0.0.1)
metaclass (0.0.4)
mime-types (1.17.2)
mocha (0.10.5)
minitest (4.2.0)
mocha (0.12.10)
metaclass (~> 0.0.1)
mongo (1.6.0)
bson (= 1.6.0)
Expand Down Expand Up @@ -128,11 +129,6 @@ GEM
redis-namespace (1.3.2)
redis (~> 3.0.4)
rubystats (0.2.3)
shoulda (3.0.1)
shoulda-context (~> 1.0.0)
shoulda-matchers (~> 1.0.0)
shoulda-context (1.0.0)
shoulda-matchers (1.0.0)
sprockets (2.0.3)
rack (~> 1.0)
tilt (~> 1.1, != 1.3.0)
Expand Down Expand Up @@ -164,7 +160,8 @@ DEPENDENCIES
garb
integration
jekyll
mocha
minitest (~> 4.2.0)
mocha (~> 0.12.8)
mongo
passenger (~> 3.0)
rack
Expand All @@ -173,7 +170,6 @@ DEPENDENCIES
redis (>= 2.1)
redis-namespace (>= 1.1.0)
rubystats
shoulda
sqlite3
timecop
vanity!
Expand Down
4 changes: 2 additions & 2 deletions gemfiles/rails32.gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@ gem "integration"
gem "rubystats"
gem "garb"
gem "SystemTimer", "1.2.3", :platforms=>:mri_18
gem "mocha", :require=>false
gem "shoulda", :require=>false
gem "timecop", :require=>false
gem "webmock", :require=>false
gem "mocha", "~> 0.12.8", :require=>false
gem "minitest", "~>4.2.0"
gem "rails", "3.2.1"
gem "fastthread", :git=>"git://github.com/zoltankiss/fastthread.git", :platforms=>:mri_20
gem "passenger", "~>3.0"
Expand Down
14 changes: 5 additions & 9 deletions gemfiles/rails32.gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -84,9 +84,10 @@ GEM
treetop (~> 1.4.8)
maruku (0.6.0)
syntax (>= 1.0.0)
metaclass (0.0.1)
metaclass (0.0.4)
mime-types (1.17.2)
mocha (0.10.5)
minitest (4.2.0)
mocha (0.12.10)
metaclass (~> 0.0.1)
mongo (1.6.0)
bson (= 1.6.0)
Expand Down Expand Up @@ -127,11 +128,6 @@ GEM
redis-namespace (1.3.2)
redis (~> 3.0.4)
rubystats (0.2.3)
shoulda (3.0.1)
shoulda-context (~> 1.0.0)
shoulda-matchers (~> 1.0.0)
shoulda-context (1.0.0)
shoulda-matchers (1.0.0)
sprockets (2.1.2)
hike (~> 1.2)
rack (~> 1.0)
Expand Down Expand Up @@ -164,7 +160,8 @@ DEPENDENCIES
garb
integration
jekyll
mocha
minitest (~> 4.2.0)
mocha (~> 0.12.8)
mongo
passenger (~> 3.0)
rack
Expand All @@ -173,7 +170,6 @@ DEPENDENCIES
redis (>= 2.1)
redis-namespace (>= 1.1.0)
rubystats
shoulda
sqlite3
timecop
vanity!
Expand Down
3 changes: 1 addition & 2 deletions gemfiles/rails4.gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,9 @@ gem "integration"
gem "rubystats"
gem "garb"
gem "SystemTimer", "1.2.3", :platforms=>:mri_18
gem "mocha", :require=>false
gem "shoulda", :require=>false
gem "timecop", :require=>false
gem "webmock", :require=>false
gem "mocha", "~> 1.0", :require=>false
gem "rails", "4.0.0"
gem "fastthread", :git=>"git://github.com/zoltankiss/fastthread.git", :platforms=>:mri_20
gem "passenger", "~>3.0"
Expand Down
14 changes: 4 additions & 10 deletions gemfiles/rails4.gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -80,10 +80,10 @@ GEM
treetop (~> 1.4.8)
maruku (0.6.0)
syntax (>= 1.0.0)
metaclass (0.0.1)
metaclass (0.0.4)
mime-types (1.25)
minitest (4.7.5)
mocha (0.14.0)
mocha (1.0.0)
metaclass (~> 0.0.1)
mongo (1.9.2)
bson (~> 1.9.2)
Expand Down Expand Up @@ -117,12 +117,6 @@ GEM
redis (~> 3.0.4)
rubystats (0.2.3)
safe_yaml (0.9.7)
shoulda (3.5.0)
shoulda-context (~> 1.0, >= 1.0.1)
shoulda-matchers (>= 1.4.1, < 3.0)
shoulda-context (1.1.6)
shoulda-matchers (2.4.0)
activesupport (>= 3.0.0)
sprockets (2.10.0)
hike (~> 1.2)
multi_json (~> 1.0)
Expand Down Expand Up @@ -162,7 +156,8 @@ DEPENDENCIES
garb
integration
jekyll
mocha
minitest (>= 4.2)
mocha (~> 1.0)
mongo
passenger (~> 3.0)
rack
Expand All @@ -171,7 +166,6 @@ DEPENDENCIES
redis (>= 2.1)
redis-namespace (>= 1.1.0)
rubystats
shoulda
sqlite3
timecop
vanity!
Expand Down
Loading

0 comments on commit 0f2f78f

Please sign in to comment.