Sha256: 96df05a39a3e83574bde0b067d593fa7d4e5b18b56180d07fa6ff28e3dc363b2

Contents?: true

Size: 902 Bytes

Versions: 12

Compression:

Stored size: 902 Bytes

Contents

require 'test_helper'

setup_database()

require 'build-tool/model/module'

class ModuleTest < ActiveSupport::TestCase

    test 'Constructor' do
        mod = BuildTool::Module.new( :name => 'test' )
        assert_equal( 'test', mod.name )
    end

    test 'Active logic' do
        mod = BuildTool::Module.new( :name => 'test_module' )
        assert_equal( 'test_module', mod.name )
        assert( mod.default_active?, 'By default all modules are active' )
        assert( mod.active?, 'By default all module are active' )
        mod.default_active = false
        assert( !mod.default_active? )
        assert( !mod.active?, 'By default active? uses default_active?' )
        mod.active = true
        assert( !mod.default_active? )
        assert( mod.active? )
        mod.active = nil
        assert( !mod.default_active? )
        assert( !mod.active? )
    end

end # class FeatureTest


Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
build-tool-0.6.9 test/unit/model/module_test.rb
build-tool-0.6.8 test/unit/model/module_test.rb
build-tool-0.6.7 test/unit/model/module_test.rb
build-tool-0.6.6 test/unit/model/module_test.rb
build-tool-0.6.5 test/unit/model/module_test.rb
build-tool-0.6.4 test/unit/model/module_test.rb
build-tool-0.6.3 test/unit/model/module_test.rb
build-tool-0.6.2 test/unit/model/module_test.rb
build-tool-0.6.1 test/unit/model/module_test.rb
build-tool-0.6.0 test/unit/model/module_test.rb
build-tool-0.6.0.rc2 test/unit/model/module_test.rb
build-tool-0.6.0.rc1 test/unit/model/module_test.rb