Sha256: 38f742681756f75e8de0e1afe3e4dda35560377a63c510ee8a7b98a1258912c8
Contents?: true
Size: 580 Bytes
Versions: 3
Compression:
Stored size: 580 Bytes
Contents
require 'test_helper' require 'signal_tools' class TestSignalTools < Test::Unit::TestCase def setup @array1 = [1,2,3,4,5,6,7,8,9,10] end def test_sum_returns_the_correct_sum_of_array_elements assert_equal(55, SignalTools::sum(@array1)) end def test_average_returns_the_correct_average_of_array_elements assert_equal(5.5, SignalTools::average(@array1)) end def test_truncate_to_shortest_returns_two_arrays_of_equal_size array2 = [1,2,3] SignalTools::truncate_to_shortest!(@array1, array2) assert_equal(@array1.size, array2.size) end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
signal_tools-0.2.2 | test/test_signal_tools.rb |
signal_tools-0.2.1 | test/test_signal_tools.rb |
signal_tools-0.2.0 | test/test_signal_tools.rb |