Commit 3762f5a1 authored by Samuel E. Giddins's avatar Samuel E. Giddins

[Hound] Clean ErrorReport Spec

parent 96ed6419
...@@ -5,11 +5,11 @@ module Pod ...@@ -5,11 +5,11 @@ module Pod
def remove_color(string) def remove_color(string)
string.gsub(/\e\[(\d+)m/, '') string.gsub(/\e\[(\d+)m/, '')
end end
describe 'In general' do describe 'In general' do
before do before do
@exception = Informative.exception('at - (~/code.rb):') @exception = Informative.exception('at - (~/code.rb):')
@exception.stubs(:backtrace).returns(['Line 1', 'Line 2']) @exception.stubs(:backtrace).returns(%w{Line 1 Line 2})
@report = UserInterface::ErrorReport @report = UserInterface::ErrorReport
end end
...@@ -81,7 +81,7 @@ EOS ...@@ -81,7 +81,7 @@ EOS
report = remove_color(@report.report(@exception)) report = remove_color(@report.report(@exception))
report.should == expected report.should == expected
end end
it 'strips the local path from the exception message' do it 'strips the local path from the exception message' do
message = @report.pathless_exception_message(@exception.message) message = @report.pathless_exception_message(@exception.message)
message = remove_color(message) message = remove_color(message)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment