Permalink
Browse files

RUBY-945 Fix rake unit test runner in 1.9.2

1.9.2 comes with a build in version of rake 0.8.7 which was being
required too early and causing problems when run in the bundled
environment.
  • Loading branch information...
1 parent 83fee2c commit 98042f4d96a8ff7ab8a200c8d5f415f506696881 Sam Goldstein committed Nov 14, 2012
Showing with 4 additions and 9 deletions.
  1. +0 −1 Gemfile
  2. +0 −5 Rakefile
  3. +4 −3 lib/tasks/tests.rake
View
@@ -5,7 +5,6 @@ group :development do
# There's problems with the test task in rake 10
# https://github.com/jimweirich/rake/issues/144
gem 'rake', '0.9.2.2'
- require 'rake'
gem 'mocha', '~>0.12.0'
gem 'shoulda', '~>3.0.1'
gem 'sdoc-helpers'
View
@@ -1,12 +1,7 @@
require 'rubygems'
require "#{File.dirname(__FILE__)}/lib/new_relic/version.rb"
-require 'rake/testtask'
-
require "#{File.dirname(__FILE__)}/lib/tasks/all.rb"
-task :test => Rake::Task['test:newrelic']
-
-task :default => :test
desc 'Generate gemspec [ build_number, stage ]'
task :gemspec, [ :build_number, :stage ] do |t, args|
View
@@ -1,12 +1,13 @@
-# run unit tests for the NewRelic Agent
begin
- require 'rake/test_task'
+ require 'rake/testtask'
rescue LoadError => e
end
if defined? Rake::TestTask
+ task :test => 'test:newrelic'
+ task :default => :test
namespace :test do
- AGENT_HOME = File.expand_path(File.join(File.dirname(__FILE__), "..",".."))
+ AGENT_HOME = File.expand_path(File.join(File.dirname(__FILE__),'..','..'))
Rake::TestTask.new(:newrelic) do |t|
t.libs << "#{AGENT_HOME}/test"
t.libs << "#{AGENT_HOME}/lib"

0 comments on commit 98042f4

Please sign in to comment.