Sha256: 8100ed241d4dee0bbce313a5de3021246ee204e01c1ce8176cc5253f5d01f328
Contents?: true
Size: 1.54 KB
Versions: 3
Compression:
Stored size: 1.54 KB
Contents
require 'test/unit' require File.expand_path '../../../../lib/model/test_status.rb', __FILE__ class TestTestStatus < Test::Unit::TestCase include Theotokos::Model def test_initialization _hash_initialization _block_initialization end def test_success status = TestStatus.new :test_file_status => true, :test_text_status => { :equals => true } assert status.success? status.error = false assert status.success? assert !status.error? status.error = true assert !status.success? assert status.error? status.test_file_status = false assert status.success? == false status.test_text_status = false assert status.success? == false status.test_file_status = true assert status.success? == false end def test_error status = TestStatus.new :test_file_status => false, :test_text_status => { :equals => false } assert status.error? status.test_file_status = true assert status.error? status.test_text_status = { :equals => true } assert status.error? == false end private def _hash_initialization status = TestStatus.new({ :test_file_status => true, :test_text_status => false }) assert status.test_file_status == true assert status.test_text_status == false end def _block_initialization status = TestStatus.new do |s| s.test_file_status = true s.test_text_status = false end assert status.test_file_status == true assert status.test_text_status == false end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
theotokos-0.1.3 | test/unit/model/test_test_status.rb |
theotokos-0.1.2 | test/unit/model/test_test_status.rb |
theotokos-0.1.1 | test/unit/model/test_test_status.rb |