Sha256: 0159baa06ddfa8891bd6ae71699a65d384e86c1ef3b68b47a8f9d234ec2ec44d
Contents?: true
Size: 876 Bytes
Versions: 1
Compression:
Stored size: 876 Bytes
Contents
# encoding: utf-8 require 'helper' class TestActsAsCode < Test::Unit::TestCase def test_constants assert_equal 'single', Codes::CivilStatus::CodeSingle end def test_constants assert_equal 2, Codes::CivilStatus::all.size assert_equal Codes::CivilStatus.lookup('single'), Codes::CivilStatus::all.first assert_equal Codes::CivilStatus.lookup('married'), Codes::CivilStatus::all.last end def test_ar_code_all Codes::ArCode.create(:code => 'code_1', :name => "Code_1_name") Codes::ArCode.create(:code => 'code_2', :name => "Code_2_name") assert_equal 2, Codes::ArCode.all.size end def test_ar_code_lookup code_1 = Codes::ArCode.create(:code => 'code_1', :name => "Code_1_name") code_2 = Codes::ArCode.create(:code => 'code_2', :name => "Code_2_name") assert_equal code_2, Codes::ArCode.lookup('code_2') end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
code-box-0.0.2 | test/code-box/test_acts_as_code.rb |