Sha256: c919cd2cc6df55734a927532acbc2df4303e9eed540026e54bbe77170e5b445e

Contents?: true

Size: 704 Bytes

Versions: 7

Compression:

Stored size: 704 Bytes

Contents

require 'minitest/autorun'


require_relative '../../lib/livetext'

class TestingLivetext < MiniTest::Test
  include Livetext::Standard
  include Livetext::UserAPI

  # Only method here "really" belongs elsewhere?  FIXME

  def test_onoff
    refute onoff('off'), "Expected onoff('off') to be false"
    assert onoff('on'),  "Expected onoff('on') to be true"
    refute onoff('oFf'), "Expected onoff('oFf') to be false"
    assert onoff('oN'),  "Expected onoff('oN') to be true"
    assert onoff(nil),   "Expected onoff(nil) to be true"

    assert_raises(ExpectedOnOff, "Should raise ExpectedOnOff") { onoff("") }
    assert_raises(ExpectedOnOff, "Should raise ExpectedOnOff") { onoff(345) }
  end

end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
livetext-0.9.21 test/unit/standard.rb
livetext-0.9.20 test/unit/standard.rb
livetext-0.9.19 test/unit/standard.rb
livetext-0.9.17 test/unit/standard.rb
livetext-0.9.15 test/unit/standard.rb
livetext-0.9.14 test/unit/standard.rb
livetext-0.9.13 test/unit/standard.rb