From e8730713d2744ab0149ad03997ad05f336c31941 Mon Sep 17 00:00:00 2001 From: Rick Olson Date: Fri, 28 Dec 2007 17:12:35 +0000 Subject: Allow setting ActiveResource::Base#format before #site. [rick] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8503 5ecf4fe2-1ee6-0310-87b1-e25e094e27de --- activeresource/test/format_test.rb | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'activeresource/test') diff --git a/activeresource/test/format_test.rb b/activeresource/test/format_test.rb index c2d3a08682..51e1bbe32a 100644 --- a/activeresource/test/format_test.rb +++ b/activeresource/test/format_test.rb @@ -64,6 +64,13 @@ class FormatTest < Test::Unit::TestCase end end + def test_setting_format_before_site + resource = Class.new(ActiveResource::Base) + resource.format = :json + resource.site = 'http://37s.sunrise.i:3000' + assert_equal ActiveResource::Formats[:json], resource.connection.format + end + private def using_format(klass, mime_type_reference) previous_format = klass.format -- cgit v1.2.3