1
0
Fork 0
mirror of https://github.com/awesome-print/awesome_print synced 2023-03-27 23:22:34 -04:00
awesome_print/spec/spec_helper.rb

23 lines
900 B
Ruby
Raw Normal View History

2011-02-03 01:48:27 -05:00
# Copyright (c) 2010-2011 Michael Dvorkin
2010-10-31 22:21:26 -04:00
#
# Awesome Print is freely distributable under the terms of MIT license.
# See LICENSE file or http://www.opensource.org/licenses/mit-license.php
#------------------------------------------------------------------------------
#
2011-05-06 18:20:52 -04:00
# Running specs from the command line:
# $ rake spec # Entire spec suite.
2011-05-06 18:20:52 -04:00
# $ ruby -S rspec spec/logger_spec.rb # Individual spec file.
2010-10-31 22:21:26 -04:00
#
2010-03-25 00:31:59 -04:00
$LOAD_PATH.unshift(File.dirname(__FILE__))
$LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
require 'ap'
def stub_dotfile!
dotfile = File.join(ENV["HOME"], ".aprc")
File.should_receive(:readable?).at_least(:once).with(dotfile).and_return(false)
2010-03-25 00:31:59 -04:00
end
# Infinity Test runs tests as subprocesses, which sets STDOUT.tty? to false and
# would otherwise prematurely disallow colors. We'll test the defaults later.
AwesomePrint.force_colors!