summaryrefslogtreecommitdiff
path: root/test/rake/test_rake_invocation_chain.rb
diff options
context:
space:
mode:
authorhsbt <hsbt@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-04-04 12:31:31 +0000
committerhsbt <hsbt@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-04-04 12:31:31 +0000
commitc4ee0df8ba2cf7cc6aaa785c8df20a91b1719021 (patch)
tree06beca468cce4a75a3e9890d18aa001ef2c41e54 /test/rake/test_rake_invocation_chain.rb
parent8c0b2a286080609613b6b007e030ff7c7adaa23c (diff)
* lib/rake/*: Gemify rake [fix GH-862][Feature #11025]
* test/rake/*: ditto. * tool/rbinstall.rb: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50163 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/rake/test_rake_invocation_chain.rb')
-rw-r--r--test/rake/test_rake_invocation_chain.rb64
1 files changed, 0 insertions, 64 deletions
diff --git a/test/rake/test_rake_invocation_chain.rb b/test/rake/test_rake_invocation_chain.rb
deleted file mode 100644
index 0176339bd46..00000000000
--- a/test/rake/test_rake_invocation_chain.rb
+++ /dev/null
@@ -1,64 +0,0 @@
-require File.expand_path('../helper', __FILE__)
-
-class TestRakeInvocationChain < Rake::TestCase
- include Rake
-
- def setup
- super
-
- @empty = InvocationChain.empty
-
- @first_member = "A"
- @second_member = "B"
- @one = @empty.append(@first_member)
- @two = @one.append(@second_member)
- end
-
- def test_conj_on_invocation_chains
- list = InvocationChain.empty.conj("B").conj("A")
- assert_equal InvocationChain.make("A", "B"), list
- assert_equal InvocationChain, list.class
- end
-
- def test_make_on_invocation_chains
- assert_equal @empty, InvocationChain.make()
- assert_equal @one, InvocationChain.make(@first_member)
- assert_equal @two, InvocationChain.make(@second_member, @first_member)
- end
-
- def test_append_with_one_argument
- chain = @empty.append("A")
-
- assert_equal 'TOP => A', chain.to_s # HACK
- end
-
- def test_append_one_circular
- ex = assert_raises RuntimeError do
- @one.append(@first_member)
- end
- assert_match(/circular +dependency/i, ex.message)
- assert_match(/A.*=>.*A/, ex.message)
- end
-
- def test_append_two_circular
- ex = assert_raises RuntimeError do
- @two.append(@first_member)
- end
- assert_match(/A.*=>.*B.*=>.*A/, ex.message)
- end
-
- def test_member_eh_one
- assert @one.member?(@first_member)
- end
-
- def test_member_eh_two
- assert @two.member?(@first_member)
- assert @two.member?(@second_member)
- end
-
- def test_to_s_empty
- assert_equal "TOP", @empty.to_s
- assert_equal "TOP => A", @one.to_s
- end
-
-end