mirror of
https://github.com/ditkrg/validates_timeliness.git
synced 2026-01-22 22:06:45 +00:00
added ginger scenarios to run specs against all supported rails versions
This commit is contained in:
parent
705e787775
commit
5a4be4a91e
19
spec/ginger_scenarios.rb
Normal file
19
spec/ginger_scenarios.rb
Normal file
@ -0,0 +1,19 @@
|
||||
# For use with the ginger gem to test plugin against multiple versions of Rails.
|
||||
#
|
||||
# To use ginger:
|
||||
#
|
||||
# sudo gem install freelancing-god-ginger --source=http://gems.github.com
|
||||
#
|
||||
# Then run
|
||||
#
|
||||
# ginger spec
|
||||
#
|
||||
Ginger.configure do |config|
|
||||
rails_versions = ['2.0.2', '2.1.2', '2.2.2']
|
||||
|
||||
rails_versions.each do |v|
|
||||
g = Ginger::Scenario.new
|
||||
g['rails'] = v
|
||||
config.scenarios << g.dup
|
||||
end
|
||||
end
|
||||
@ -12,7 +12,11 @@ vendored_rails = File.dirname(__FILE__) + '/../../../../vendor/rails'
|
||||
if vendored = File.exists?(vendored_rails)
|
||||
Dir.glob(vendored_rails + "/**/lib").each { |dir| $:.unshift dir }
|
||||
else
|
||||
gem 'rails', "=#{ENV['VERSION']}" if ENV['VERSION']
|
||||
begin
|
||||
require 'ginger'
|
||||
rescue LoadError
|
||||
end
|
||||
gem 'rails'
|
||||
end
|
||||
|
||||
RAILS_ROOT = File.dirname(__FILE__)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user