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

@ -9,33 +9,33 @@ Rails::VendorGemSourceIndex.silence_spec_warnings = true
uses_mocha "Plugin Tests" do
class GemDependencyTest < Test::Unit::TestCase
def setup
@gem = Rails::GemDependency.new "hpricot"
@gem_with_source = Rails::GemDependency.new "hpricot", :source => "http://code.whytheluckystiff.net"
@gem_with_version = Rails::GemDependency.new "hpricot", :version => "= 0.6"
@gem_with_lib = Rails::GemDependency.new "aws-s3", :lib => "aws/s3"
@gem_without_load = Rails::GemDependency.new "hpricot", :lib => false
@gem = Rails::GemDependency.new "xhpricotx"
@gem_with_source = Rails::GemDependency.new "xhpricotx", :source => "http://code.whytheluckystiff.net"
@gem_with_version = Rails::GemDependency.new "xhpricotx", :version => "= 0.6"
@gem_with_lib = Rails::GemDependency.new "xaws-s3x", :lib => "aws/s3"
@gem_without_load = Rails::GemDependency.new "xhpricotx", :lib => false
end
def test_configuration_adds_gem_dependency
config = Rails::Configuration.new
config.gem "aws-s3", :lib => "aws/s3", :version => "0.4.0"
assert_equal [["install", "aws-s3", "--version", '"= 0.4.0"']], config.gems.collect(&:install_command)
config.gem "xaws-s3x", :lib => "aws/s3", :version => "0.4.0"
assert_equal [["install", "xaws-s3x", "--version", '"= 0.4.0"']], config.gems.collect(&:install_command)
end
def test_gem_creates_install_command
assert_equal %w(install hpricot), @gem.install_command
assert_equal %w(install xhpricotx), @gem.install_command
end
def test_gem_with_source_creates_install_command
assert_equal %w(install hpricot --source http://code.whytheluckystiff.net), @gem_with_source.install_command
assert_equal %w(install xhpricotx --source http://code.whytheluckystiff.net), @gem_with_source.install_command
end
def test_gem_with_version_creates_install_command
assert_equal ["install", "hpricot", "--version", '"= 0.6"'], @gem_with_version.install_command
assert_equal ["install", "xhpricotx", "--version", '"= 0.6"'], @gem_with_version.install_command
end
def test_gem_creates_unpack_command
assert_equal %w(unpack hpricot), @gem.unpack_command
assert_equal %w(unpack xhpricotx), @gem.unpack_command
end
def test_gem_with_version_unpack_install_command
@ -43,7 +43,7 @@ uses_mocha "Plugin Tests" do
mock_spec = mock()
mock_spec.stubs(:version).returns('0.6')
@gem_with_version.stubs(:specification).returns(mock_spec)
assert_equal ["unpack", "hpricot", "--version", '= 0.6'], @gem_with_version.unpack_command
assert_equal ["unpack", "xhpricotx", "--version", '= 0.6'], @gem_with_version.unpack_command
end
def test_gem_adds_load_paths
@ -129,5 +129,18 @@ uses_mocha "Plugin Tests" do
assert_equal '1.0.0', DUMMY_GEM_E_VERSION
end
def test_gem_handle_missing_dependencies
dummy_gem = Rails::GemDependency.new "dummy-gem-g"
dummy_gem.add_load_paths
dummy_gem.load
assert dummy_gem.loaded?
assert_equal 2, dummy_gem.dependencies.size
assert_nothing_raised do
dummy_gem.dependencies.each do |g|
g.dependencies
end
end
end
end
end