Sha256: 180db6f1eec74a837dd9db52866cc8c8b486e29f0676b94ee2617d313d3c2602

Contents?: true

Size: 703 Bytes

Versions: 3

Compression:

Stored size: 703 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

3 entries across 3 versions & 1 rubygems

Version Path
livetext-0.9.24 test/unit/standard.rb
livetext-0.9.23 test/unit/standard.rb
livetext-0.9.22 test/unit/standard.rb