diff --git a/spec/views/notices/_backtrace.html.haml_spec.rb b/spec/views/notices/_backtrace.html.haml_spec.rb index 6db6826..d162336 100644 --- a/spec/views/notices/_backtrace.html.haml_spec.rb +++ b/spec/views/notices/_backtrace.html.haml_spec.rb @@ -2,13 +2,16 @@ require 'spec_helper' describe "notices/_backtrace.html.haml" do describe 'missing file in backtrace' do - it "should replace nil file with [unknown source]" do + before do notice = Factory(:notice, :backtrace => [{ 'number' => rand(999), 'file' => nil, 'method' => ActiveSupport.methods.shuffle.first }]) assign :app, notice.err.app + end + + it "should replace nil file with [unknown source]" do render :partial => "notices/backtrace", :locals => {:lines => notice.backtrace} rendered.should match(/\[unknown source\]/) end -- libgit2 0.21.2