test/test_loop.rb in conv-0.0.3 vs test/test_loop.rb in conv-0.0.4
- old
+ new
@@ -1,8 +1,8 @@
require 'helper'
-class TestConv < Test::Unit::TestCase
+class TestLoop < Test::Unit::TestCase
context "A Loop instance " do
setup do
@al = Loop.new([1,2,3,4,5,"hog","cannon","globe"])
end
@@ -10,15 +10,17 @@
should "be class loop" do
assert_equal @al.class, Loop
end
@expected_methods = %w[next prev forward backward current set_position position]
- @expected_methods.each do |m|
+
+ @expected_methods.each do |m|
should "respond to #{m}" do
- assert_respond_to(@al, m)
+ assert_respond_to(@al, m, "did not respond to #{m}")
end
end
+
should "go next and prev" do
c = @al.current
n = @al.next
b = @al.prev
\ No newline at end of file