Sha256: aa5f48fe4f09907bb064a6176bce1c905183b37590b6df97fbb82b448d4706fa
Contents?: true
Size: 882 Bytes
Versions: 1
Compression:
Stored size: 882 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.for_code('single'), Codes::CivilStatus::all.first assert_equal Codes::CivilStatus.for_code('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.for_code('code_2') end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
code-box-0.1.0 | test/code-box/test_acts_as_code.rb |