Permalink
Browse files

Introduce fake_models.rb to avoid platform-specific code. [mpalmer] C…

…loses #8714

git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7190 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
  • Loading branch information...
1 parent 872c5f4 commit b549366216f6cb607bf06c19701912a2e0d1f77c @NZKoz NZKoz committed Jul 17, 2007
@@ -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

0 comments on commit b549366

Please sign in to comment.