Skip to content

Commit

Permalink
Fix T::U loading.
Browse files Browse the repository at this point in the history
The constants changed and there's no file on 3.0
  • Loading branch information
steveklabnik committed Dec 3, 2012
1 parent 686e887 commit 9d9ac1c
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions lib/draper/test/test_unit_integration.rb
@@ -1,8 +1,17 @@
require "rake/testtask"
require "rails/test_unit/sub_test_task"

klass = nil

if Rails.version[0,3] == "3.0"
require 'rails/test_unit/railtie'
klass = Rake::TestTask
else
require "rails/test_unit/sub_test_task"
klass = Rails::SubTestTask
end

namespace :test do
Rails::SubTestTask.new(:decorators => "test:prepare") do |t|
klass.new(:decorators => "test:prepare") do |t|
t.libs << "test"
t.pattern = "test/decorators/**/*_test.rb"
end
Expand Down

0 comments on commit 9d9ac1c

Please sign in to comment.