Ruby on Rails | Screencasts | Download | Documentation | Weblog | Community | Source

Changeset 3352

Show
Ignore:
Timestamp:
12/26/05 19:40:14 (3 years ago)
Author:
marcel
Message:

Value of full_messages on stubbed out AR instances should be an Array.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/actionpack/lib/action_controller/assertions.rb

    r3341 r3352  
    310310       
    311311      def clean_backtrace(&block) 
    312         begin 
    313           yield 
    314         rescue AssertionFailedError => e          
    315           path = File.expand_path(__FILE__) 
    316           raise AssertionFailedError, e.message, e.backtrace.reject { |line| File.expand_path(line) =~ /#{path}/ } 
    317         end            
     312        yield 
     313      rescue AssertionFailedError => e          
     314        path = File.expand_path(__FILE__) 
     315        raise AssertionFailedError, e.message, e.backtrace.reject { |line| File.expand_path(line) =~ /#{path}/ } 
    318316      end 
    319317    end 
  • trunk/actionpack/test/controller/action_pack_assertions_test.rb

    r2635 r3352  
    8888      def errors 
    8989        Class.new do  
    90            def full_messages; '...stuff...'; end           
     90           def full_messages; []; end           
    9191        end.new 
    9292      end     
     
    107107      def errors 
    108108        Class.new do  
    109            def full_messages; '...stuff...'; end           
     109           def full_messages; ['...stuff...']; end           
    110110        end.new 
    111111      end