Skip to content
Browse files

Merge pull request #8836 from sikachu/3-0-stable-fix-ars

Remove test for XML YAML parsing
  • Loading branch information...
2 parents 7909e7f + f252755 commit ca8b0bd0e0755c9a613dabff84259c84eac58585 @carlosantoniodasilva carlosantoniodasilva committed Jan 8, 2013
Showing with 0 additions and 38 deletions.
  1. +0 −24 activeresource/test/cases/base_test.rb
  2. +0 −14 activeresource/test/cases/finder_test.rb
View
24 activeresource/test/cases/base_test.rb
@@ -53,25 +53,11 @@ def setup
:children => [{:name => 'Natacha'}]},
{:name => 'Milena',
:children => []}]}]}.to_xml(:root => 'customer')
- # - resource with yaml array of strings; for ARs using serialize :bar, Array
- @marty = <<-eof.strip
- <?xml version=\"1.0\" encoding=\"UTF-8\"?>
- <person>
- <id type=\"integer\">5</id>
- <name>Marty</name>
- <colors type=\"yaml\">---
- - \"red\"
- - \"green\"
- - \"blue\"
- </colors>
- </person>
- eof
ActiveResource::HttpMock.respond_to do |mock|
mock.get "/people/1.xml", {}, @matz
mock.get "/people/2.xml", {}, @david
mock.get "/people/6.json", {}, @joe
- mock.get "/people/5.xml", {}, @marty
mock.get "/people/Greg.xml", {}, @greg
mock.get "/people/4.xml", {'key' => 'value'}, nil, 404
mock.put "/people/1.xml", {}, nil, 204
@@ -1109,14 +1095,4 @@ def test_parse_deep_nested_resources
end
end
end
-
- def test_load_yaml_array
- assert_nothing_raised do
- marty = Person.find(5)
- assert_equal 3, marty.colors.size
- marty.colors.each do |color|
- assert_kind_of String, color
- end
- end
- end
end
View
14 activeresource/test/cases/finder_test.rb
@@ -50,24 +50,10 @@ def setup
:children => [{:name => 'Natacha'}]},
{:name => 'Milena',
:children => []}]}]}.to_xml(:root => 'customer')
- # - resource with yaml array of strings; for ARs using serialize :bar, Array
- @marty = <<-eof.strip
- <?xml version=\"1.0\" encoding=\"UTF-8\"?>
- <person>
- <id type=\"integer\">5</id>
- <name>Marty</name>
- <colors type=\"yaml\">---
- - \"red\"
- - \"green\"
- - \"blue\"
- </colors>
- </person>
- eof
ActiveResource::HttpMock.respond_to do |mock|
mock.get "/people/1.xml", {}, @matz
mock.get "/people/2.xml", {}, @david
- mock.get "/people/5.xml", {}, @marty
mock.get "/people/Greg.xml", {}, @greg
mock.get "/people/4.xml", {'key' => 'value'}, nil, 404
mock.put "/people/1.xml", {}, nil, 204

0 comments on commit ca8b0bd

Please sign in to comment.
Something went wrong with that request. Please try again.