John Firebaugh
1723a7a6c6
Move to_xml tests to xml_serialization_test.rb
...
One duplicate was eliminated: test_to_xml_including_methods/
test_methods_are_called_on_object.
2011-07-17 11:34:07 -07:00
Aaron Patterson
61774e0d49
please use ruby -I lib:test path/to/test.rb, or export RUBY_OPT
2011-06-06 15:47:13 -07:00
Jon Leighton
253bb6b926
Refactor Active Record test connection setup. Please see the RUNNING_UNIT_TESTS file for details, but essentially you can now configure things in test/config.yml. You can also run tests directly via the command line, e.g. ruby path/to/test.rb (no rake needed, uses default db connection from test/config.yml). This will help us fix the CI by enabling us to isolate the different Rails versions to different databases.
2011-06-04 23:47:03 +01:00
Joshua Wehner
2cef2d411a
Methods that return nil should not be considered YAML
2011-05-10 12:06:09 -04:00
Franck Verrot
aa40543022
Provide test for #4840 : to_xml doesn't work in such case: Event.select('title as t').to_xml
2010-12-15 14:02:30 -08:00
Mike Dvorkin
f572a02b94
Take into account current time zone when serializing datetime values [ #6096 state:resolved]
...
Signed-off-by: José Valim <jose.valim@gmail.com>
2010-12-09 09:01:49 +01:00
Subba Rao Pasupuleti
b0c7dee4f2
removing unused models from tests
...
[#5153 state:resolved]
Signed-off-by: José Valim <jose.valim@gmail.com>
2010-07-21 22:08:07 +02:00
Neeraj Singh
883f27aa9a
test cases for record.to_xml [ #458 state:resolved]
...
Signed-off-by: José Valim <jose.valim@gmail.com>
2010-04-30 13:19:30 +02:00
José Valim
2e9af3638d
Move several configuration values from Hash to ActiveSupport::XmlMini, which both Hash and Array depends on.
...
Also, refactored ActiveModel serializers to just use ActiveSupport::XmlMini.to_tag. As consequence, if a serialized attribute is an array or a hash, it's not encoded as yaml, but as a hash or array.
2010-04-29 12:42:42 +02:00
Santiago Pastorino
c4846c99c5
Missing require added
2010-04-18 00:12:08 -03:00
Aaron Patterson
b7693dc028
working around syck defects by optionally matching a space [ #4426 state:resolved]
...
Signed-off-by: wycats <wycats@gmail.com>
2010-04-17 00:50:59 -04:00
mfoster
5850edf104
Made arrays of ActiveRecords, and any classes, with namespaces convert to valid xml. [ #3824 state:resolved]
...
Signed-off-by: José Valim <jose.valim@gmail.com>
2010-04-10 18:12:43 +02:00
John Maxwell
c39151a847
Patch to ActiveModel's (and ActiveRecord, by association) XML serialization: If two parameters are present in Procs supplied to to_xml's :procs option, the model being serialized will be passed as the second argument [ #2373 state:resolved]
...
Signed-off-by: Joshua Peek <josh@joshpeek.com>
2009-07-22 20:47:15 -05:00
Bruce Krysiak
8272630ce8
Ensure ActiveRecord#to_xml respects :skip_types for included associations [ #1632 state:resolved]
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
2009-03-10 11:17:16 +00:00
Bruce Krysiak
aa5cdb0d47
Added a :camelize option to ActiveRecord and Hash to_xml serialization and from_xml deserialization
...
Signed-off-by: Michael Koziarski <michael@koziarski.com>
2008-12-10 20:28:05 +01:00
Jeremy Kemper
39814fcce0
Merge branch 'ar-test-cleanup' of git://git.geeksomnia.com/rails
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8681 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-01-21 17:20:51 +00:00
Jeremy Kemper
1e70928014
Fix paths
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8661 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-01-18 07:31:37 +00:00
Jeremy Kemper
42b39ae3f2
Move tests to cases
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8660 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-01-18 07:30:42 +00:00