Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Use appraisal for testing across ActiveRecord versions

  • Loading branch information...
commit 6b0b3ce748a214c255d12218b9d98bb92ba054d2 1 parent 1b28476
@jferris jferris authored
View
2  .bundle/config
@@ -0,0 +1,2 @@
+---
+BUNDLE_DISABLE_SHARED_GEMS: "1"
View
12 Appraisals
@@ -0,0 +1,12 @@
+appraise "2.1" do
+ gem "activerecord", "~> 2.1"
+end
+
+appraise "2.3" do
+ gem "activerecord", "~> 2.3"
+end
+
+appraise "3.0" do
+ gem "activerecord", "~> 3.0"
+end
+
View
10 Gemfile
@@ -0,0 +1,10 @@
+source "http://rubygems.org"
+gem "cucumber"
+gem "rake"
+gem "rspec", "~> 1.3"
+gem "rcov"
+gem "activerecord", :require => false
+gem "rr"
+gem "sqlite3-ruby", :require => false
+gem "appraisal"
+
View
51 Gemfile.lock
@@ -0,0 +1,51 @@
+GEM
+ remote: http://rubygems.org/
+ specs:
+ activemodel (3.0.1)
+ activesupport (= 3.0.1)
+ builder (~> 2.1.2)
+ i18n (~> 0.4.1)
+ activerecord (3.0.1)
+ activemodel (= 3.0.1)
+ activesupport (= 3.0.1)
+ arel (~> 1.0.0)
+ tzinfo (~> 0.3.23)
+ activesupport (3.0.1)
+ appraisal (0.1)
+ bundler
+ rake
+ arel (1.0.1)
+ activesupport (~> 3.0.0)
+ builder (2.1.2)
+ cucumber (0.9.4)
+ builder (~> 2.1.2)
+ diff-lcs (~> 1.1.2)
+ gherkin (~> 2.2.9)
+ json (~> 1.4.6)
+ term-ansicolor (~> 1.0.5)
+ diff-lcs (1.1.2)
+ gherkin (2.2.9)
+ json (~> 1.4.6)
+ term-ansicolor (~> 1.0.5)
+ i18n (0.4.2)
+ json (1.4.6)
+ rake (0.8.7)
+ rcov (0.9.9)
+ rr (1.0.2)
+ rspec (1.3.0)
+ sqlite3-ruby (1.3.2)
+ term-ansicolor (1.0.5)
+ tzinfo (0.3.23)
+
+PLATFORMS
+ ruby
+
+DEPENDENCIES
+ activerecord
+ appraisal
+ cucumber
+ rake
+ rcov
+ rr
+ rspec (~> 1.3)
+ sqlite3-ruby
View
11 Rakefile
@@ -1,19 +1,17 @@
require 'rubygems'
+require 'bundler/setup'
require 'rake'
require 'rake/rdoctask'
require 'rcov/rcovtask'
require 'date'
require 'rake/gempackagetask'
-
require 'spec/rake/spectask'
require 'cucumber/rake/task'
+require 'appraisal'
desc 'Default: run the specs and features.'
-task :default do
- system("rake -s spec:unit;")
- %w(2.1 2.3 3.0).each do |version|
- system("RAILS_VERSION=#{version} rake -s spec:acceptance features;")
- end
+task :default => 'spec:unit' do
+ system("rake -s appraisal spec:acceptance features;")
end
namespace :spec do
@@ -67,3 +65,4 @@ Rake::GemPackageTask.new($specification) do |package|
package.need_zip = true
package.need_tar = true
end
+
View
9 features/support/env.rb
@@ -2,14 +2,5 @@
$: << File.join(PROJECT_ROOT, 'lib')
-case ENV['RAILS_VERSION']
-when '2.1' then
- gem 'activerecord', '~>2.1.0'
-when '3.0' then
- gem 'activerecord', '~>3.0.0'
-else
- gem 'activerecord', '~>2.3.0'
-end
-
require 'active_record'
require 'factory_girl'
View
11 gemfiles/2.1.gemfile
@@ -0,0 +1,11 @@
+# This file was generated by Appraisal
+
+source "http://rubygems.org"
+gem "rr"
+gem "activerecord", "~> 2.1"
+gem "rake"
+gem "sqlite3-ruby", {:require=>false}
+gem "rspec", "~> 1.3"
+gem "rcov"
+gem "cucumber"
+gem "appraisal"
View
40 gemfiles/2.1.gemfile.lock
@@ -0,0 +1,40 @@
+GEM
+ remote: http://rubygems.org/
+ specs:
+ activerecord (2.1.0)
+ activesupport (= 2.1.0)
+ activesupport (2.1.0)
+ appraisal (0.1)
+ bundler
+ rake
+ builder (2.1.2)
+ cucumber (0.9.4)
+ builder (~> 2.1.2)
+ diff-lcs (~> 1.1.2)
+ gherkin (~> 2.2.9)
+ json (~> 1.4.6)
+ term-ansicolor (~> 1.0.5)
+ diff-lcs (1.1.2)
+ gherkin (2.2.9)
+ json (~> 1.4.6)
+ term-ansicolor (~> 1.0.5)
+ json (1.4.6)
+ rake (0.8.7)
+ rcov (0.9.9)
+ rr (1.0.2)
+ rspec (1.3.0)
+ sqlite3-ruby (1.3.2)
+ term-ansicolor (1.0.5)
+
+PLATFORMS
+ ruby
+
+DEPENDENCIES
+ activerecord (~> 2.1)
+ appraisal
+ cucumber
+ rake
+ rcov
+ rr
+ rspec (~> 1.3)
+ sqlite3-ruby
View
11 gemfiles/2.3.gemfile
@@ -0,0 +1,11 @@
+# This file was generated by Appraisal
+
+source "http://rubygems.org"
+gem "rr"
+gem "activerecord", "~> 2.3"
+gem "rake"
+gem "sqlite3-ruby", {:require=>false}
+gem "rspec", "~> 1.3"
+gem "rcov"
+gem "cucumber"
+gem "appraisal"
View
40 gemfiles/2.3.gemfile.lock
@@ -0,0 +1,40 @@
+GEM
+ remote: http://rubygems.org/
+ specs:
+ activerecord (2.3.9)
+ activesupport (= 2.3.9)
+ activesupport (2.3.9)
+ appraisal (0.1)
+ bundler
+ rake
+ builder (2.1.2)
+ cucumber (0.9.4)
+ builder (~> 2.1.2)
+ diff-lcs (~> 1.1.2)
+ gherkin (~> 2.2.9)
+ json (~> 1.4.6)
+ term-ansicolor (~> 1.0.5)
+ diff-lcs (1.1.2)
+ gherkin (2.2.9)
+ json (~> 1.4.6)
+ term-ansicolor (~> 1.0.5)
+ json (1.4.6)
+ rake (0.8.7)
+ rcov (0.9.9)
+ rr (1.0.2)
+ rspec (1.3.0)
+ sqlite3-ruby (1.3.2)
+ term-ansicolor (1.0.5)
+
+PLATFORMS
+ ruby
+
+DEPENDENCIES
+ activerecord (~> 2.3)
+ appraisal
+ cucumber
+ rake
+ rcov
+ rr
+ rspec (~> 1.3)
+ sqlite3-ruby
View
11 gemfiles/3.0.gemfile
@@ -0,0 +1,11 @@
+# This file was generated by Appraisal
+
+source "http://rubygems.org"
+gem "rr"
+gem "activerecord", "~> 3.0"
+gem "rake"
+gem "sqlite3-ruby", {:require=>false}
+gem "rspec", "~> 1.3"
+gem "rcov"
+gem "cucumber"
+gem "appraisal"
View
51 gemfiles/3.0.gemfile.lock
@@ -0,0 +1,51 @@
+GEM
+ remote: http://rubygems.org/
+ specs:
+ activemodel (3.0.1)
+ activesupport (= 3.0.1)
+ builder (~> 2.1.2)
+ i18n (~> 0.4.1)
+ activerecord (3.0.1)
+ activemodel (= 3.0.1)
+ activesupport (= 3.0.1)
+ arel (~> 1.0.0)
+ tzinfo (~> 0.3.23)
+ activesupport (3.0.1)
+ appraisal (0.1)
+ bundler
+ rake
+ arel (1.0.1)
+ activesupport (~> 3.0.0)
+ builder (2.1.2)
+ cucumber (0.9.4)
+ builder (~> 2.1.2)
+ diff-lcs (~> 1.1.2)
+ gherkin (~> 2.2.9)
+ json (~> 1.4.6)
+ term-ansicolor (~> 1.0.5)
+ diff-lcs (1.1.2)
+ gherkin (2.2.9)
+ json (~> 1.4.6)
+ term-ansicolor (~> 1.0.5)
+ i18n (0.4.2)
+ json (1.4.6)
+ rake (0.8.7)
+ rcov (0.9.9)
+ rr (1.0.2)
+ rspec (1.3.0)
+ sqlite3-ruby (1.3.2)
+ term-ansicolor (1.0.5)
+ tzinfo (0.3.23)
+
+PLATFORMS
+ ruby
+
+DEPENDENCIES
+ activerecord (~> 3.0)
+ appraisal
+ cucumber
+ rake
+ rcov
+ rr
+ rspec (~> 1.3)
+ sqlite3-ruby
View
9 spec/acceptance/acceptance_helper.rb
@@ -1,12 +1,3 @@
-case ENV['RAILS_VERSION']
-when '2.1' then
- gem 'activerecord', '~>2.1.0'
-when '3.0' then
- gem 'activerecord', '~>3.0.0'
-else
- gem 'activerecord', '~>2.3.0'
-end
-
require 'active_record'
require 'active_record/version'
Please sign in to comment.
Something went wrong with that request. Please try again.