Sha256: 552c8b76917ede572b3cdf5922f788987d9b42209487780d1c14435dd2087661
Contents?: true
Size: 691 Bytes
Versions: 1
Compression:
Stored size: 691 Bytes
Contents
require './test/test_helper' class TestStock < Minitest::Test def setup ticker = "TESTING" @days = 90 YahooFinance.stub(:get_historical_quotes, data_for_tests(@days)) do @stock = SignalTools::Stock.new(ticker) end end def test_stock_should_have_correct_number_of_data_elements assert_equal(@days, @stock.dates.size) assert_equal(@days, @stock.ema.size) assert_equal(@days, @stock.macd[:divergences].size) assert_equal(@days, @stock.fast_stochastic[:k].size) assert_equal(@days, @stock.slow_stochastic[:k].size) assert_equal(@days, @stock.average_true_range.size) assert_equal(@days, @stock.average_directional_index.size) end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
signal_tools-0.3.1 | test/test_stock.rb |