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