From 1bdc92f9b6a1215e85cc3a1bc1b527c0417a2e36 Mon Sep 17 00:00:00 2001 From: Nathan Broadbent Date: Wed, 31 Aug 2011 11:41:14 +0800 Subject: [PATCH] Fixed notices/backtrace spec. Need to set instance variables in a before block. --- spec/views/notices/_backtrace.html.haml_spec.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/spec/views/notices/_backtrace.html.haml_spec.rb b/spec/views/notices/_backtrace.html.haml_spec.rb index d162336..f98867a 100644 --- a/spec/views/notices/_backtrace.html.haml_spec.rb +++ b/spec/views/notices/_backtrace.html.haml_spec.rb @@ -3,16 +3,16 @@ require 'spec_helper' describe "notices/_backtrace.html.haml" do describe 'missing file in backtrace' do before do - notice = Factory(:notice, :backtrace => [{ + @notice = Factory(:notice, :backtrace => [{ 'number' => rand(999), 'file' => nil, 'method' => ActiveSupport.methods.shuffle.first }]) - assign :app, notice.err.app + assign :app, @notice.err.app end it "should replace nil file with [unknown source]" do - render :partial => "notices/backtrace", :locals => {:lines => notice.backtrace} + render :partial => "notices/backtrace", :locals => {:lines => @notice.backtrace} rendered.should match(/\[unknown source\]/) end end -- libgit2 0.21.2