Commit 1bdc92f9b6a1215e85cc3a1bc1b527c0417a2e36

Authored by Nathan Broadbent
1 parent 6cb52119
Exists in master and in 1 other branch production

Fixed notices/backtrace spec. Need to set instance variables in a before block.

spec/views/notices/_backtrace.html.haml_spec.rb
... ... @@ -3,16 +3,16 @@ require 'spec_helper'
3 3 describe "notices/_backtrace.html.haml" do
4 4 describe 'missing file in backtrace' do
5 5 before do
6   - notice = Factory(:notice, :backtrace => [{
  6 + @notice = Factory(:notice, :backtrace => [{
7 7 'number' => rand(999),
8 8 'file' => nil,
9 9 'method' => ActiveSupport.methods.shuffle.first
10 10 }])
11   - assign :app, notice.err.app
  11 + assign :app, @notice.err.app
12 12 end
13 13  
14 14 it "should replace nil file with [unknown source]" do
15   - render :partial => "notices/backtrace", :locals => {:lines => notice.backtrace}
  15 + render :partial => "notices/backtrace", :locals => {:lines => @notice.backtrace}
16 16 rendered.should match(/\[unknown source\]/)
17 17 end
18 18 end
... ...