Introduce fake_models.rb to avoid platform-specific code. [mpalmer] Closes #8714
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7190 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
This commit is contained in:
parent
872c5f4380
commit
b549366216
5
actionpack/test/controller/fake_models.rb
Normal file
5
actionpack/test/controller/fake_models.rb
Normal file
@ -0,0 +1,5 @@
|
||||
class Customer < Struct.new(:name, :id)
|
||||
def to_param
|
||||
id.to_s
|
||||
end
|
||||
end
|
@ -1,10 +1,5 @@
|
||||
require File.dirname(__FILE__) + '/../abstract_unit'
|
||||
|
||||
class Customer < Struct.new(:name, :id)
|
||||
def to_param
|
||||
id.to_s
|
||||
end
|
||||
end
|
||||
require File.dirname(__FILE__) + '/fake_models'
|
||||
|
||||
class CustomersController < ActionController::Base
|
||||
end
|
||||
|
@ -1,8 +1,5 @@
|
||||
require File.dirname(__FILE__) + '/../abstract_unit'
|
||||
|
||||
unless defined?(Customer)
|
||||
Customer = Struct.new("Customer", :name)
|
||||
end
|
||||
require File.dirname(__FILE__) + '/fake_models'
|
||||
|
||||
module Fun
|
||||
class GamesController < ActionController::Base
|
||||
|
Loading…
Reference in New Issue
Block a user