aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test
diff options
context:
space:
mode:
authorSean Griffin <sean@seantheprogrammer.com>2017-01-03 12:33:31 -0500
committerGitHub <noreply@github.com>2017-01-03 12:33:31 -0500
commit929ded40fc1bdeb42353868b7ada9e73615ad4b4 (patch)
treede4e4deaabb8c91785505a3d56870bb761d8f765 /activerecord/test
parent0f1d0b1b5254e3678abaabbebb3362a100c10262 (diff)
parent9981baba1e9de07ae54cdbad7e5aa93d94c371fd (diff)
downloadrails-929ded40fc1bdeb42353868b7ada9e73615ad4b4.tar.gz
rails-929ded40fc1bdeb42353868b7ada9e73615ad4b4.tar.bz2
rails-929ded40fc1bdeb42353868b7ada9e73615ad4b4.zip
Merge pull request #27335 from kamipo/remove_duplicated_model_definition
Remove duplicated model class definitions in `test/cases/base_test.rb`
Diffstat (limited to 'activerecord/test')
-rw-r--r--activerecord/test/cases/base_test.rb11
-rw-r--r--activerecord/test/models/boolean.rb3
2 files changed, 4 insertions, 10 deletions
diff --git a/activerecord/test/cases/base_test.rb b/activerecord/test/cases/base_test.rb
index dd40f38b5a..a611cc208c 100644
--- a/activerecord/test/cases/base_test.rb
+++ b/activerecord/test/cases/base_test.rb
@@ -4,6 +4,7 @@ require "models/author"
require "models/topic"
require "models/reply"
require "models/category"
+require "models/categorization"
require "models/company"
require "models/customer"
require "models/developer"
@@ -33,8 +34,6 @@ class SecondAbstractClass < FirstAbstractClass
self.abstract_class = true
end
class Photo < SecondAbstractClass; end
-class Category < ActiveRecord::Base; end
-class Categorization < ActiveRecord::Base; end
class Smarts < ActiveRecord::Base; end
class CreditCard < ActiveRecord::Base
class PinNumber < ActiveRecord::Base
@@ -45,8 +44,6 @@ class CreditCard < ActiveRecord::Base
class Brand < Category; end
end
class MasterCreditCard < ActiveRecord::Base; end
-class Post < ActiveRecord::Base; end
-class Computer < ActiveRecord::Base; end
class NonExistentTable < ActiveRecord::Base; end
class TestOracleDefault < ActiveRecord::Base; end
@@ -56,12 +53,6 @@ end
class Weird < ActiveRecord::Base; end
-class Boolean < ActiveRecord::Base
- def has_fun
- super
- end
-end
-
class LintTest < ActiveRecord::TestCase
include ActiveModel::Lint::Tests
diff --git a/activerecord/test/models/boolean.rb b/activerecord/test/models/boolean.rb
index 7bae22e5f9..0da228aac2 100644
--- a/activerecord/test/models/boolean.rb
+++ b/activerecord/test/models/boolean.rb
@@ -1,2 +1,5 @@
class Boolean < ActiveRecord::Base
+ def has_fun
+ super
+ end
end