Instiki 0.16.3: Rails 2.3.0

Instiki now runs on the Rails 2.3.0 Candidate Release.
Among other improvements, this means that it now 
automagically selects between WEBrick and Mongrel.

Just run

    ./instiki --daemon
This commit is contained in:
Jacques Distler 2009-02-04 14:26:08 -06:00
parent 43aadecc99
commit 4e14ccc74d
893 changed files with 71965 additions and 28511 deletions

View file

@ -15,7 +15,7 @@ class FormatTest < Test::Unit::TestCase
assert_equal 'Accept', header_name
headers_names = [ActiveResource::Connection::HTTP_FORMAT_HEADER_NAMES[:put], ActiveResource::Connection::HTTP_FORMAT_HEADER_NAMES[:post]]
headers_names.each{|header_name| assert_equal 'Content-Type', header_name}
headers_names.each{ |name| assert_equal 'Content-Type', name }
end
def test_formats_on_single_element
@ -85,20 +85,20 @@ class FormatTest < Test::Unit::TestCase
end
def test_serialization_of_nested_resource
address = { :street => '12345 Street' }
person = { :name=> 'Rus', :address => address}
address = { :street => '12345 Street' }
person = { :name=> 'Rus', :address => address}
[:json, :xml].each do |format|
encoded_person = ActiveResource::Formats[format].encode(person)
assert_match /12345 Street/, encoded_person
remote_person = Person.new(person.update({:address => StreetAddress.new(address)}))
assert_kind_of StreetAddress, remote_person.address
using_format(Person, format) do
ActiveResource::HttpMock.respond_to.post "/people.#{format}", {'Content-Type' => ActiveResource::Formats[format].mime_type}, encoded_person, 201, {'Location' => "/people/5.#{format}"}
remote_person.save
end
end
end
[:json, :xml].each do |format|
encoded_person = ActiveResource::Formats[format].encode(person)
assert_match(/12345 Street/, encoded_person)
remote_person = Person.new(person.update({:address => StreetAddress.new(address)}))
assert_kind_of StreetAddress, remote_person.address
using_format(Person, format) do
ActiveResource::HttpMock.respond_to.post "/people.#{format}", {'Content-Type' => ActiveResource::Formats[format].mime_type}, encoded_person, 201, {'Location' => "/people/5.#{format}"}
remote_person.save
end
end
end
private
def using_format(klass, mime_type_reference)