Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Activate pp only if $PRETTY set.

  • Loading branch information...
commit dfb772f6f45d9ced829037504bab6a7434221472 1 parent 020f4be
@zenspider zenspider authored
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)
Please sign in to comment.
Something went wrong with that request. Please try again.