aboutsummaryrefslogtreecommitdiffstats
path: root/actionview/test/fixtures/company.rb
diff options
context:
space:
mode:
Diffstat (limited to 'actionview/test/fixtures/company.rb')
-rw-r--r--actionview/test/fixtures/company.rb9
1 files changed, 9 insertions, 0 deletions
diff --git a/actionview/test/fixtures/company.rb b/actionview/test/fixtures/company.rb
new file mode 100644
index 0000000000..f3ac3642fa
--- /dev/null
+++ b/actionview/test/fixtures/company.rb
@@ -0,0 +1,9 @@
+class Company < ActiveRecord::Base
+ has_one :mascot
+ self.sequence_name = :companies_nonstd_seq
+
+ validates_presence_of :name
+ def validate
+ errors.add('rating', 'rating should not be 2') if rating == 2
+ end
+end