class TestPlay

Constants

ROOT

Public Instance Methods

setup() click to toggle source
# File test/test_play.rb, line 11
def setup
  @p = CW::Play.new('words')
end
teardown() click to toggle source
# File test/test_play.rb, line 15
def teardown
  @cw = nil
end
test_add_space() click to toggle source
# File test/test_play.rb, line 44
def test_add_space
  words = CW::Words.new
  words.assign ['some','words']

  assert_equal 'some words ',  @p.add_space(words)
end
test_audio_instantiates_AudioPlayer_object() click to toggle source
# File test/test_play.rb, line 24
def test_audio_instantiates_AudioPlayer_object
  assert_equal CW::AudioPlayer, @p.audio.class
end
test_init_play_words_timeout_sets_delay_play_time() click to toggle source
# File test/test_play.rb, line 33
def test_init_play_words_timeout_sets_delay_play_time
  @p.init_play_words_timeout
  assert_equal 2.0, @p.instance_variable_get('@delay_play_time')
end
test_init_play_words_timeout_sets_start_play_time() click to toggle source
# File test/test_play.rb, line 28
def test_init_play_words_timeout_sets_start_play_time
  @p.init_play_words_timeout
  assert((Time.now - @p.instance_variable_get('@start_play_time')) < 1)
end
test_play_object_takes_a_word_parameter() click to toggle source
# File test/test_play.rb, line 19
def test_play_object_takes_a_word_parameter
  play = CW::Play.new('words object')
  assert_equal 'words object', play.instance_variable_get('@words')
end
test_start_sync() click to toggle source
# File test/test_play.rb, line 38
def test_start_sync
  refute @p.start_sync?
  @p.start_sync
  assert @p.start_sync?
end