Permalink
Browse files

Activate pp only if $PRETTY set.

  • Loading branch information...
1 parent 020f4be commit dfb772f6f45d9ced829037504bab6a7434221472 @zenspider zenspider committed Jan 29, 2008
Showing with 8 additions and 2 deletions.
  1. +1 −1 .autotest
  2. +7 −1 mspec/matchers/base.rb
View
2 .autotest
@@ -17,7 +17,7 @@ class Autotest
def make_test_cmd files_to_test
# until bin/ci and bin/mspec allow for regexps, run the whole file again
classes = reorder(files_to_test).map { |k,v| k }.join(' ')
- "#{ruby} #{classes} | #{unit_diff}"
+ "PRETTY=1 #{ruby} #{classes} | #{unit_diff}"
end
end
View
8 mspec/matchers/base.rb
@@ -1,4 +1,10 @@
-require 'pp'
+if ENV['PRETTY'] then
+ require 'pp'
+else
+ class Object
+ alias :pretty_inspect :inspect
+ end
+end
class PositiveOperatorMatcher
def initialize(actual)

0 comments on commit dfb772f

Please sign in to comment.