lib/xcpretty.rb in xcpretty-0.1.12 vs lib/xcpretty.rb in xcpretty-0.2.0
- old
+ new
@@ -1,9 +1,10 @@
require 'xcpretty/version'
require 'xcpretty/printer'
require 'xcpretty/syntax'
require 'xcpretty/snippet'
+require 'xcpretty/term'
require 'xcpretty/formatters/formatter'
require 'xcpretty/formatters/simple'
require 'xcpretty/formatters/rspec'
require 'xcpretty/formatters/knock'
require 'xcpretty/formatters/tap'
@@ -19,15 +20,13 @@
raise unless klass.is_a?(Class)
klass
end
def self.load_custom_formatter(path)
- begin
- $:.unshift File.dirname(path)
- class_from_path(path)
- rescue SyntaxError => e
- exit_with_error("Expected formatter source file to return a class. #{e}")
- end
+ $LOAD_PATH.unshift File.dirname(path)
+ class_from_path(path)
+ rescue SyntaxError => e
+ exit_with_error("Expected formatter source file to return a class. #{e}")
end
def self.exit_with_error(message)
$stderr.puts "[!] #{message}"
exit 1