Skip to content

Commit

Permalink
Activate pp only if $PRETTY set.
Browse files Browse the repository at this point in the history
  • Loading branch information
zenspider committed Jan 29, 2008
1 parent 020f4be commit dfb772f
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .autotest
Expand Up @@ -17,7 +17,7 @@ class Autotest
def make_test_cmd files_to_test def make_test_cmd files_to_test
# until bin/ci and bin/mspec allow for regexps, run the whole file again # until bin/ci and bin/mspec allow for regexps, run the whole file again
classes = reorder(files_to_test).map { |k,v| k }.join(' ') classes = reorder(files_to_test).map { |k,v| k }.join(' ')
"#{ruby} #{classes} | #{unit_diff}" "PRETTY=1 #{ruby} #{classes} | #{unit_diff}"
end end
end end


Expand Down
8 changes: 7 additions & 1 deletion 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 class PositiveOperatorMatcher
def initialize(actual) def initialize(actual)
Expand Down

0 comments on commit dfb772f

Please sign in to comment.