Commit Graph

155 Commits

Author SHA1 Message Date
Adam Meehan
40369efdff GMT to UTC in spec for 1.8.7 2009-12-11 15:18:22 +11:00
Adam Meehan
f41016af93 spec for missing translation 2009-12-11 15:17:46 +11:00
Adam Meehan
78baa7a3cc move default validator options to constant 2009-12-11 11:13:35 +11:00
Adam Meehan
a6712de5ff use global error value formats if missing in locale
always loads globals value formats into class accessor
replace old format accessor methods class accessor
2009-12-11 11:06:21 +11:00
Adam Meehan
b11893eac0 fix dummy date part in Validator.type_cast_value
removed all core extensions
2009-09-12 14:14:37 +10:00
Adam Meehan
6db8b7d908 push dummy date value assignment into Formats.parse and allow custom values to be used 2009-09-12 13:07:01 +10:00
Adam Meehan
1b865cc834 split ignore_sec into own describe 2009-09-12 13:05:11 +10:00
Adam Meehan
c29478df45 fix deprecation for ActiveRecord::Errors#generate_message in Rails 2.3.4
ginger scenario added 2.3.4
2009-09-12 13:05:11 +10:00
Adam Meehan
df3283e5a1 fix ignore_usec for with_date and with_time options 2009-09-12 13:05:04 +10:00
Adam Meehan
0e382e15f2 moved action view extension enable call to relevant spec 2009-09-11 13:13:02 +10:00
Adam Meehan
9a697b9cab finally fixed spec for latest rspec 2009-09-11 13:11:09 +10:00
Adam Meehan
e399c6b510 moved mutliparam helper methods our of AR to reduce method pollution 2009-07-28 12:52:25 +10:00
Adam Meehan
7aa1a87731 require matcher in spec helper 2009-07-28 12:51:32 +10:00
Adam Meehan
1a31e7463d have to manually require matcher now because the presence of the Spec
namespace caused issues for shoulda when not using rspec:wq
2009-07-07 15:32:15 +10:00
Adam Meehan
75a3b2bd83 version 2.1 2009-06-20 22:30:08 +10:00
Adam Meehan
9b300e084b change to spec/autorun 2009-06-20 19:43:13 +10:00
Adam Meehan
d61dddfbc6 fix i18n locale load order to allow customisation
fix interpolation values for i18n
2009-06-19 12:06:36 +10:00
Adam Meehan
34c0f25225 dramatically simplify the before_type_cast hack and remove read method override
simplified write method with no dirty attributes hackery
2009-06-06 16:37:06 +10:00
Adam Meehan
57c3fdca88 set RAILS_ENV spec_helper 2009-06-06 11:36:03 +10:00
Adam Meehan
7aac14c874 added ambiguous year threshold setting 2009-06-06 11:16:19 +10:00
Adam Meehan
bb94e234bc add :format option to validate and parse with specific a format 2009-04-10 10:57:27 +10:00
Adam Meehan
f041524124 add equal_to option to matcher 2009-04-10 10:48:24 +10:00
Adam Meehan
e1d23d0f2b Merge branch '2.0.0' 2009-04-09 18:54:34 +10:00
Adam Meehan
b197d537f1 fix read attribute bug for frozen record (reported by Les Nightingill) 2009-04-06 13:52:07 +10:00
Adam Meehan
1e3c802031 capture zone offset value in formats to possible usage 2009-03-31 21:35:49 +11:00
Adam Meehan
9e2d95c3e1 remove brittle and not very useful specs, which are covered elsewhere 2009-03-31 14:22:13 +11:00
Adam Meehan
8303be05c3 little spec consistency 2009-03-30 21:03:51 +11:00
Adam Meehan
f4ed751c26 changed back to using error_value_formats for Rails 2.0/2.1 2009-03-28 19:51:11 +11:00
Adam Meehan
956933f58b disable multiparameter values extension by default for v2 2009-03-28 18:53:47 +11:00
Adam Meehan
7967b5a212 refactored error value formats to use locale file for I18n. Rail 2.0/2.1 to use default_error_value_formats now.
moved default_error_messages_method into validator
2009-03-28 18:49:26 +11:00
Adam Meehan
a836ed8434 changed Formats#parse to take options hash for strict and other possibilities 2009-03-28 17:35:41 +11:00
Adam Meehan
c2a4f45b5a removed old spec 2009-03-28 17:35:21 +11:00
Adam Meehan
312c1510cb refactored AR parsing methods into Parser module to reduce AR method pollution and make more consistent 2009-03-28 17:25:48 +11:00
Adam Meehan
d1ee94248b added :equal_to and :ignore_usec options. the later is for ignore microsecond value in datetime restrictions 2009-03-19 20:49:06 +11:00
Adam Meehan
eecef62de4 updating ginger scenarios with Rails 2.3.2 2009-03-19 20:47:50 +11:00
Adam Meehan
903850bc23 Merge branch 'with' for with_date and with_time options 2009-03-10 15:51:07 +11:00
Adam Meehan
1dbac5190b fix last refactor so it casts Date object to time if attribute is datetime or time with spec added 2009-03-05 19:56:38 +11:00
Adam Meehan
19457a6c1d removed some module inclusion silliness in spec 2009-02-27 23:40:14 +11:00
Adam Meehan
862b41f903 added :with_date and :with_time options
refactored restriction_value into evaluate_option_value class method for more general usage
refactored type_cast_value into class method
2009-02-09 16:44:03 +11:00
Adam Meehan
904c202fb4 little cleanup and consistency 2009-02-09 12:11:56 +11:00
Adam Meehan
1001d29c01 rails 2.3.0 fix with I18n.reload!
added 2.3 to ginger list
2009-02-08 20:54:45 +11:00
Adam Meehan
7ef9078369 use the value from validates_each in validator 2009-02-08 12:46:22 +11:00
Adam Meehan
a1ae5f9313 added option key validation to prevent silly validation problems due to bad key name 2009-02-01 20:08:07 +11:00
Adam Meehan
71583805c8 fixed regex for yy format token which wasn't greedy enough when datetime string parsed as date causing a 4 digit year to be extracted as first 2 digits 2009-01-21 14:07:35 +11:00
Adam Meehan
0ad8ace335 refactored AR attribute methods to define read method for all date, time and datetime attributes. Makes things much clearer and fixes bug reported (#2) by Brad (pvjg) 2009-01-13 10:12:41 +11:00
Adam Meehan
760a52a2a4 cleanup matcher spec a little 2009-01-12 13:08:22 +11:00
Adam Meehan
011ea070db fix interpolation_values examples for rails version without i18n 2009-01-12 13:03:21 +11:00
Adam Meehan
b632093ce2 add examples for custom_error_messages and interpolation values. what can I say? TATFT 2009-01-12 12:36:37 +11:00
Adam Meehan
a71d6f7945 added between option testing to matcher and refactored 2009-01-01 20:13:44 +11:00
Adam Meehan
45ab815039 added between option and some refactoring 2009-01-01 20:11:30 +11:00