remove redundant empty lines from PluginTest
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@11936 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
parent
9aad7c3907
commit
bbd0cb269d
|
@ -18,7 +18,6 @@
|
|||
require File.expand_path('../../../../test_helper', __FILE__)
|
||||
|
||||
class Redmine::PluginTest < ActiveSupport::TestCase
|
||||
|
||||
def setup
|
||||
@klass = Redmine::Plugin
|
||||
# In case some real plugins are installed
|
||||
|
@ -55,7 +54,6 @@ class Redmine::PluginTest < ActiveSupport::TestCase
|
|||
|
||||
def test_installed
|
||||
@klass.register(:foo) {}
|
||||
|
||||
assert_equal true, @klass.installed?(:foo)
|
||||
assert_equal false, @klass.installed?(:bar)
|
||||
end
|
||||
|
@ -74,7 +72,6 @@ class Redmine::PluginTest < ActiveSupport::TestCase
|
|||
|
||||
def test_delete_menu_item
|
||||
Redmine::MenuManager.map(:project_menu).push(:foo_menu_item, '/foo', :caption => 'Foo')
|
||||
|
||||
assert_difference 'Redmine::MenuManager.items(:project_menu).size', -1 do
|
||||
@klass.register :foo do
|
||||
delete_menu_item :project_menu, :foo_menu_item
|
||||
|
@ -98,7 +95,6 @@ class Redmine::PluginTest < ActiveSupport::TestCase
|
|||
def test_requires_redmine
|
||||
plugin = Redmine::Plugin.register(:foo) {}
|
||||
Redmine::VERSION.stubs(:to_a).returns([2, 1, 3, "stable", 10817])
|
||||
|
||||
# Specific version without hash
|
||||
assert plugin.requires_redmine('2.1.3')
|
||||
assert plugin.requires_redmine('2.1')
|
||||
|
@ -108,7 +104,6 @@ class Redmine::PluginTest < ActiveSupport::TestCase
|
|||
assert_raise Redmine::PluginRequirementError do
|
||||
plugin.requires_redmine('2.2')
|
||||
end
|
||||
|
||||
# Specific version
|
||||
assert plugin.requires_redmine(:version => '2.1.3')
|
||||
assert plugin.requires_redmine(:version => ['2.1.3', '2.2.0'])
|
||||
|
@ -122,7 +117,6 @@ class Redmine::PluginTest < ActiveSupport::TestCase
|
|||
assert_raise Redmine::PluginRequirementError do
|
||||
plugin.requires_redmine(:version => '2.2')
|
||||
end
|
||||
|
||||
# Version range
|
||||
assert plugin.requires_redmine(:version => '2.0.0'..'2.2.4')
|
||||
assert plugin.requires_redmine(:version => '2.1.3'..'2.2.4')
|
||||
|
@ -133,8 +127,6 @@ class Redmine::PluginTest < ActiveSupport::TestCase
|
|||
assert_raise Redmine::PluginRequirementError do
|
||||
plugin.requires_redmine(:version => '2.1.4'..'2.2.4')
|
||||
end
|
||||
|
||||
|
||||
# Version or higher
|
||||
assert plugin.requires_redmine(:version_or_higher => '0.1.0')
|
||||
assert plugin.requires_redmine(:version_or_higher => '2.1.3')
|
||||
|
@ -150,12 +142,10 @@ class Redmine::PluginTest < ActiveSupport::TestCase
|
|||
def test_requires_redmine_plugin
|
||||
test = self
|
||||
other_version = '0.5.0'
|
||||
|
||||
@klass.register :other do
|
||||
name 'Other'
|
||||
version other_version
|
||||
end
|
||||
|
||||
@klass.register :foo do
|
||||
test.assert requires_redmine_plugin(:other, :version_or_higher => '0.1.0')
|
||||
test.assert requires_redmine_plugin(:other, :version_or_higher => other_version)
|
||||
|
@ -163,7 +153,6 @@ class Redmine::PluginTest < ActiveSupport::TestCase
|
|||
test.assert_raise Redmine::PluginRequirementError do
|
||||
requires_redmine_plugin(:other, :version_or_higher => '99.0.0')
|
||||
end
|
||||
|
||||
test.assert requires_redmine_plugin(:other, :version => other_version)
|
||||
test.assert requires_redmine_plugin(:other, :version => [other_version, '99.0.0'])
|
||||
test.assert_raise Redmine::PluginRequirementError do
|
||||
|
@ -182,7 +171,6 @@ class Redmine::PluginTest < ActiveSupport::TestCase
|
|||
test.assert_raise Redmine::PluginNotFound do
|
||||
requires_redmine_plugin(:missing, :version => '0.1.0')
|
||||
end
|
||||
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue