Blob Blame History Raw
From 8c16b393eace237a233ea330b36ec3591a6c3790 Mon Sep 17 00:00:00 2001
From: Ken Dreyer <ktdreyer@ktdreyer.com>
Date: Mon, 12 May 2014 13:32:08 -0600
Subject: [PATCH] tests: load minitest before rr

When running the tests via rake/hoe (for example, with the `rake test`
command), Rake invokes ruby and loads minitest/autorun before invoking
the any of the actual test suite files.

On the other hand, when running the tests outside of rake/hoe, the test
suite's helper.rb loads the RR gem before loading minitest/autorun. This
ordering causes the test suite to fail because it cannot recognize the
"mock()" function from RR.

Switch the ordering so that minitest/autorun loads before rr. This
allows the test suite to pass in both cases.
---
 test/helper.rb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/test/helper.rb b/test/helper.rb
index d21e102..45fee19 100644
--- a/test/helper.rb
+++ b/test/helper.rb
@@ -1,8 +1,8 @@
 require 'rubygems'
-require 'rr'
 require 'minitest/unit'
 require 'minitest/spec'
 require 'minitest/autorun'
+require 'rr'
 
 require File.expand_path(File.join(File.dirname(__FILE__), "..", "lib", "loofah"))
 
-- 
1.9.0