search for: validations_test

Displaying 4 results from an estimated 4 matches for "validations_test".

2006 Jun 25
0
Using the database schema to help validate data
...#39; keynote as RailsConf 2006. This little patch will validate that your text fields will fit into the database. Obviously this is just a start, and many more validations could be added. Also, this code could probably be extracted into a plugin instead of patch to ActiveRecord. Index: test/validations_test.rb =================================================================== --- test/validations_test.rb (revision 4495) +++ test/validations_test.rb (working copy) @@ -461,6 +461,13 @@ t.title = nil assert t.valid? end + + def test_validates_database_schema + Topic.validates_data...
2005 Mar 07
6
Automatic timestamping in join tables [596]
Hi, A few days ago I submitted the following ticket http://dev.rubyonrails.com/ticket/596 asking that ActiveRecord::Timestamp also apply for the join tables of habtm. The answer was that it was left for milestone 1.x, and since I think that without this functionality rails 1.0 would be incomplete, I''m raising the issue here to discuss it. My use case is very simple, I
2010 Jun 11
5
Issues creating tables in mysql tests
...ed_test.rb" "test/cases/validations/association_validation_test.rb" "test/cases/validations/i18n_generate_message_validation_test.rb" "test/cases/validations/i18n_validation_test.rb" "test/cases/validations/uniqueness_validation_test.rb" "test/cases/validations_test.rb" "test/cases/xml_serialization_test.rb" "test/cases/yaml_serialization_test.rb" /Users/pupeno/.rvm/gems/ruby-1.8.7-p174@railsdev/gems/bundler-0.9.26/lib/bundler.rb:72: warning: instance variable @setup not initialized /Users/pupeno/.rvm/gems/ruby-1.8.7-p174@railsdev/gems...
2008 Jan 16
0
[CruiseControl] RubyOnRails build 8649 failed
...rb:1939:in `initialize'' ./test/../lib/active_record/base.rb:1939:in `each'' ./test/../lib/active_record/base.rb:1939:in `initialize'' ./test/../lib/active_record/validations.rb:908:in `new'' ./test/../lib/active_record/validations.rb:908:in `create!'' ./test/validations_test.rb:155:in `test_create_with_exceptions_using_scope_and_empty_attributes'' ./test/../lib/active_record/base.rb:1702:in `with_scope'' ./test/validations_test.rb:154:in `test_create_with_exceptions_using_scope_and_empty_attributes'' ./test/validations_test.rb:153:in `test_creat...