diff options
author | Rick Olson <technoweenie@gmail.com> | 2007-12-28 17:12:35 +0000 |
---|---|---|
committer | Rick Olson <technoweenie@gmail.com> | 2007-12-28 17:12:35 +0000 |
commit | e8730713d2744ab0149ad03997ad05f336c31941 (patch) | |
tree | c7be2a44a573aee844b8691b4ec8af5f11e46b29 /activeresource/test | |
parent | c54b915825b034b431b4b0cdb28f8ca00fca808d (diff) | |
download | rails-e8730713d2744ab0149ad03997ad05f336c31941.tar.gz rails-e8730713d2744ab0149ad03997ad05f336c31941.tar.bz2 rails-e8730713d2744ab0149ad03997ad05f336c31941.zip |
Allow setting ActiveResource::Base#format before #site. [rick]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8503 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'activeresource/test')
-rw-r--r-- | activeresource/test/format_test.rb | 7 |
1 files changed, 7 insertions, 0 deletions
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 |