Skip to content

Commit

Permalink
test with Rails 2.1.0, also
Browse files Browse the repository at this point in the history
  • Loading branch information
mislav committed Aug 12, 2008
1 parent 920f4c2 commit 7a3b81b
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 9 deletions.
4 changes: 2 additions & 2 deletions test/database.yml
Expand Up @@ -9,8 +9,8 @@ sqlite2:

mysql:
adapter: mysql
username: rails
password: mislav
username: root
password:
encoding: utf8
database: will_paginate_unittest

Expand Down
17 changes: 10 additions & 7 deletions test/tasks.rake
Expand Up @@ -32,18 +32,21 @@ task :test_databases => %w(test_mysql test_sqlite3 test_postgres)
desc %{Test everything on SQLite3, MySQL and PostgreSQL}
task :test_full => %w(test test_mysql test_postgres)

desc %{Test everything with Rails 1.2.x and 2.0.x gems}
desc %{Test everything with Rails 2.1.x, 2.0.x & 1.2.x gems}
task :test_all do
all = Rake::Task['test_full']
ENV['RAILS_VERSION'] = '~>1.2.6'
all.invoke
# reset the invoked flag
versions = %w(2.1.0 2.0.2 1.2.6)
versions.each do |version|
ENV['RAILS_VERSION'] = "~> #{version}"
all.invoke
reset_invoked unless version == versions.last
end
end

def reset_invoked
%w( test_full test test_mysql test_postgres ).each do |name|
Rake::Task[name].instance_variable_set '@already_invoked', false
end
# do it again
ENV['RAILS_VERSION'] = '~>2.0.2'
all.invoke
end

task :rcov do
Expand Down

0 comments on commit 7a3b81b

Please sign in to comment.