Permalink
Browse files

Add support for appraisals gem

Use the appraisals gem to test against multiple versions of
Active Record. Rails 2.2 is not compatible with Ruby 1.9.x so
these tests are excluded.
  • Loading branch information...
pixeltrix authored and jcoglan committed Jul 26, 2012
1 parent 316b59a commit 8364d9697ddf73b985678263558f61933ff592d6
View
@@ -1,5 +1,6 @@
*.sqlite3
*.db
Gemfile.lock
+gemfiles/*.lock
pkg
rdoc
View
@@ -5,5 +5,16 @@ rvm:
- 1.9.2
- 1.9.3
-script: bundle exec rspec spec/
+gemfile:
+ - gemfiles/rails_2_2.gemfile
+ - gemfiles/rails_2_3.gemfile
+ - gemfiles/rails_3_0.gemfile
+ - gemfiles/rails_3_1.gemfile
+ - gemfiles/rails_3_2.gemfile
+matrix:
+ exclude:
+ - rvm: 1.9.2
+ gemfile: gemfiles/rails_2_2.gemfile
+ - rvm: 1.9.3
+ gemfile: gemfiles/rails_2_2.gemfile
View
@@ -0,0 +1,21 @@
+appraise 'rails_2_2' do
+ gem 'activerecord', '~> 2.2.3'
+ gem 'factory_girl', '~> 2.3.0'
+ gem 'rake', '~> 0.8.7'
+end
+
+appraise 'rails_2_3' do
+ gem 'activerecord', '~> 2.3.8'
+end
+
+appraise 'rails_3_0' do
+ gem 'activerecord', '~> 3.0.15'
+end
+
+appraise 'rails_3_1' do
+ gem 'activerecord', '~> 3.1.6'
+end
+
+appraise 'rails_3_2' do
+ gem 'activerecord', '~> 3.2.6'
+end
View
@@ -1,2 +1,4 @@
source "http://rubygems.org"
+
+gem 'rdoc', :platforms => :ruby_18
gemspec
View
@@ -1,4 +1,5 @@
require "rubygems"
+require "appraisal"
task :default => :spec
View
@@ -0,0 +1,10 @@
+# This file was generated by Appraisal
+
+source "http://rubygems.org"
+
+gem "rdoc", :platforms=>:ruby_18
+gem "activerecord", "~> 2.2.3"
+gem "factory_girl", "~> 2.3.0"
+gem "rake", "~> 0.8.7"
+
+gemspec :path=>"../"
@@ -0,0 +1,8 @@
+# This file was generated by Appraisal
+
+source "http://rubygems.org"
+
+gem "rdoc", :platforms=>:ruby_18
+gem "activerecord", "~> 2.3.8"
+
+gemspec :path=>"../"
@@ -0,0 +1,8 @@
+# This file was generated by Appraisal
+
+source "http://rubygems.org"
+
+gem "rdoc", :platforms=>:ruby_18
+gem "activerecord", "~> 3.0.15"
+
+gemspec :path=>"../"
@@ -0,0 +1,8 @@
+# This file was generated by Appraisal
+
+source "http://rubygems.org"
+
+gem "rdoc", :platforms=>:ruby_18
+gem "activerecord", "~> 3.1.6"
+
+gemspec :path=>"../"
@@ -0,0 +1,8 @@
+# This file was generated by Appraisal
+
+source "http://rubygems.org"
+
+gem "rdoc", :platforms=>:ruby_18
+gem "activerecord", "~> 3.2.6"
+
+gemspec :path=>"../"
View
@@ -17,6 +17,7 @@ spec = Gem::Specification.new do |s|
s.add_dependency("json")
s.add_dependency("rack")
+ s.add_development_dependency("appraisal", "~> 0.4.0")
s.add_development_dependency("activerecord", "~> 3.2.0") # The SQLite adapter in 3.1 is broken
s.add_development_dependency("rspec")
s.add_development_dependency("sqlite3")

0 comments on commit 8364d96

Please sign in to comment.