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

Ticket #8714: fix_actionpack_tests.patch

File fix_actionpack_tests.patch, 1.3 kB (added by mpalmer, 2 years ago)

Improved patch

  • actionpack/test/controller/render_test.rb

    old new  
    11require File.dirname(__FILE__) + '/../abstract_unit' 
     2require File.dirname(__FILE__) + '/fake_models' 
    23 
    3 unless defined?(Customer) 
    4   Customer = Struct.new("Customer", :name) 
    5 end 
    6  
    74module Fun 
    85  class GamesController < ActionController::Base 
    96    def hello_world 
  • actionpack/test/controller/new_render_test.rb

    old new  
    11require File.dirname(__FILE__) + '/../abstract_unit' 
     2require File.dirname(__FILE__) + '/fake_models' 
    23 
    3 class Customer < Struct.new(:name, :id) 
    4   def to_param 
    5     id.to_s 
    6   end 
    7 end 
    8  
    94class CustomersController < ActionController::Base 
    105end 
    116 
  • actionpack/test/controller/fake_models.rb

    old new  
     1class Customer < Struct.new(:name, :id) 
     2  def to_param 
     3    id.to_s 
     4  end 
     5end