Class: TestBuiltinTask
- Inherits:
-
Test::Unit::TestCase
- Object
- Test::Unit::TestCase
- TestBuiltinTask
- Defined in:
- lib/tests/test_structure.rb
Constant Summary collapse
- OUTPUT_DIR =
'tests/data/output'
Instance Method Summary collapse
- #test_builtin_task ⇒ Object
- #test_create_default_project_task ⇒ Object
- #test_create_website_task ⇒ Object
Instance Method Details
#test_builtin_task ⇒ Object
25 26 27 28 29 |
# File 'lib/tests/test_structure.rb', line 25 def test_builtin_task Dokkit.application.init Dokkit.application.define_builtin_tasks assert_equal('create', Dokkit.application['create'].to_s) end |
#test_create_default_project_task ⇒ Object
31 32 33 34 35 36 37 38 |
# File 'lib/tests/test_structure.rb', line 31 def test_create_default_project_task Dokkit.application.init Dokkit.application.define_builtin_tasks Dokkit.application.collect_tasks ["create", "#{OUTPUT_DIR}/simple_document"] Dokkit.application.run dir_content = Dir["#{OUTPUT_DIR}/simple_document/*"] assert(!dir_content.empty? && !dir_content.include?('lib')) end |
#test_create_website_task ⇒ Object
40 41 42 43 44 45 46 47 |
# File 'lib/tests/test_structure.rb', line 40 def test_create_website_task Dokkit.application.init Dokkit.application.do_option('--project',"website") Dokkit.application.define_builtin_tasks Dokkit.application.collect_tasks ["create", "#{OUTPUT_DIR}/website_project"] Dokkit.application.run assert(Dir["#{OUTPUT_DIR}/website_project/*"].size > 1) end |