Changeset 9238 for trunk/activesupport/test
- Timestamp:
- 04/08/08 03:45:26 (5 months ago)
- Files:
-
- trunk/activesupport/test/json/encoding_test.rb (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/activesupport/test/json/encoding_test.rb
r9203 r9238 39 39 StandardTimeTests = [[ Time.utc(2005,2,1,15,15,10), %("2005-02-01T15:15:10Z") ]] 40 40 StandardDateTimeTests = [[ DateTime.civil(2005,2,1,15,15,10), %("2005-02-01T15:15:10+00:00") ]] 41 StandardStringTests = [[ 'this is the <string>', %("this is the <string>")]] 41 42 42 43 constants.grep(/Tests$/).each do |class_tests| 43 44 define_method("test_#{class_tests[0..-6].underscore}") do 44 45 begin 46 ActiveSupport.escape_html_entities_in_json = class_tests !~ /^Standard/ 45 47 ActiveSupport.use_standard_json_time_format = class_tests =~ /^Standard/ 46 48 self.class.const_get(class_tests).each do |pair| … … 48 50 end 49 51 ensure 52 ActiveSupport.escape_html_entities_in_json = false 50 53 ActiveSupport.use_standard_json_time_format = false 51 54 end