Permalink
Browse files

Remove ancient test constructor which I believe was a workaround for …

…Ruby's strange scoping of local variables
  • Loading branch information...
1 parent d4a253e commit 7413a3cf8faf14e5c14479486869085911321f59 Matt Walker committed Apr 19, 2012
Showing with 8 additions and 9 deletions.
  1. +8 −9 test/test_assembly.rb
View
@@ -1,13 +1,6 @@
require 'test/unit'
require 'cascading'
-# Convenience for basic assembly tests; not valid for applications
-def assembly(name, &block)
- assembly = Assembly.new(name, nil)
- assembly.instance_eval(&block)
- assembly
-end
-
class TC_Assembly < Test::Unit::TestCase
def mock_assembly(&block)
assembly = nil
@@ -41,11 +34,17 @@ def mock_branched_assembly(&block)
end
def test_create_assembly_simple
- assembly = assembly 'assembly1' do
- # Empty assembly
+ assembly = nil
+ flow 'test_create_assembly_simple' do
+ assembly = assembly 'assembly1' do
+ # Empty assembly
+ end
end
assert_not_nil assembly
+ assert_equal assembly.name, 'assembly1'
+ assert_equal 0, assembly.children.size
+
pipe = assembly.tail_pipe
assert pipe.is_a? Java::CascadingPipe::Pipe
end

0 comments on commit 7413a3c

Please sign in to comment.