Sha256: ab5aa088856ca82cda866c76696fdefb0c6e07909327e17762dcdc315b4d2023

Contents?: true

Size: 701 Bytes

Versions: 13

Compression:

Stored size: 701 Bytes

Contents

# -*- coding: utf-8 -*-


require_relative 'helper'


class TestFunction < Test::Unit::TestCase

  include Rucy::Tester

  def test_do_nothing_returns_nil ()
    assert_equal nil, do_nothing
  end

  def test_returns_nil ()
    assert_equal nil, return_nil
  end

  def test_return_int ()
    assert_kind_of Integer, return_int
  end

  def test_return_float ()
    assert_kind_of Float, return_float
  end

  def test_return_string ()
    assert_kind_of String, return_string
  end

  def test_check_arg_count ()
    assert_equal :ok, arg_count_must_1(:arg1)
    assert_raise(ArgumentError) {arg_count_must_1}
    assert_raises(ArgumentError) {arg_count_must_1 :arg1, :arg2}
  end

end# TestFunction

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
rucy-0.1.21 test/test_function.rb
rucy-0.1.20 test/test_function.rb
rucy-0.1.18 test/test_function.rb
rucy-0.1.16 test/test_function.rb
rucy-0.1.15 test/test_function.rb
rucy-0.1.14 test/test_function.rb
rucy-0.1.13 test/test_function.rb
rucy-0.1.12 test/test_function.rb
rucy-0.1.11 test/test_function.rb
rucy-0.1.10 test/test_function.rb
rucy-0.1.9 test/test_function.rb
rucy-0.1.8 test/test_function.rb
rucy-0.1.7 test/test_function.rb