From 96a9cd32705b3594bf0ed9a9a73809f229965b3d Mon Sep 17 00:00:00 2001 From: Torsten Ruger Date: Sun, 27 Apr 2014 16:09:22 +0300 Subject: [PATCH] fixed asserts --- test/test_nodes.rb | 8 ++++---- test/test_parser.rb | 1 - 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/test/test_nodes.rb b/test/test_nodes.rb index ec178614..85af353b 100644 --- a/test/test_nodes.rb +++ b/test/test_nodes.rb @@ -19,19 +19,19 @@ class TestNodes < MiniTest::Test def test_number tree = parse "42" - assert tree.is_a? Vm::NumberExpression + assert_kind_of Vm::NumberExpression , tree assert_equal 42 , tree.value end def test_args tree = parse "( 42 )" - assert tree.is_a? Hash - assert tree[:args].is_a? Vm::NumberExpression + assert_kind_of Hash , tree + assert_kind_of Vm::NumberExpression , tree[:args] assert_equal 42 , tree[:args].value end def test_arg_list @parser = @parser.args tree = parse "(42, foo)" - assert_equal Array , tree.class + assert_instance_of Array , tree assert_equal 42 , tree.first.value assert_equal "foo" , tree.last.name end diff --git a/test/test_parser.rb b/test/test_parser.rb index 447cc9df..46d1978a 100644 --- a/test/test_parser.rb +++ b/test/test_parser.rb @@ -1,5 +1,4 @@ require_relative 'helper' -require 'minitest/spec' class ParserTest < MiniTest::Test