Sha256: 223a6599eef303b22252e28037f9ac95ff9a7eb73e40542bbe3a8e2a031eff0d

Contents?: true

Size: 1.6 KB

Versions: 2

Compression:

Stored size: 1.6 KB

Contents

require File.dirname(__FILE__) + '/test_helper.rb'

class DepoConfigureTest < GeneratorTest
  def test_roots
    Depo.clear_config!
    Depo.configure {
      author 'niquola@gmail.com'
      themes ['tundra','verdugo']

      app_package 'medhub'

      environments {
        developmentDjConfig 'parseOnLoad:true;isDebug:true;'
        productionDjConfig 'parseOnLoad:true;isDebug:false;'
      }

      build_options {
        cssOptimize 'comments.keepLines'
        optimize 'shrinksafe.keepLines'
        cssImportIgnore '../dijit.css'
        internStrings 'true'
      }

      build_profile {
        libs<< 'mylib'

        pages<< 'app.pages.admin'
        pages<< 'app.pages.chart'
        pages<< 'app.pages.nurse'
        pages<< 'app.pages.dashboard'
      }

      generators {
        head_of_test_page <<-HTML
        <link rel="stylesheet" href="#{Depo.config.src_path}/common.css" type="text/css" />
        HTML
      }
    }

    config=Depo.config
    assert_equal('public/ria', config.root)
    assert_equal('/ria', config.root_webpath)
    assert_equal('public/ria/src', config.src_path)
    assert_equal('public/ria/builds', config.builds_path)
    assert_equal('niquola@gmail.com', config.author)
    assert_equal('medhub', config.app_package)

    assert_equal(['tundra','verdugo'],config.themes)
    assert_equal('parseOnLoad:true;isDebug:true;',config.environments.developmentDjConfig)
    assert(config.build_profile.pages.include?('app.pages.admin'))
    assert(config.build_profile.libs.include?('mylib'))

    assert_match(/common.css/, config.generators.head_of_test_page )
    Depo.clear_config!
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
depo-0.0.8 test/config_test.rb
depo-0.0.7 test/config_test.rb