Class: ScaffoldTest
- Inherits:
-
Test::Unit::TestCase
- Object
- Test::Unit::TestCase
- ScaffoldTest
- Defined in:
- lib/mako/test/test_scaffold.rb
Instance Method Summary collapse
Instance Method Details
#setup ⇒ Object
5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 |
# File 'lib/mako/test/test_scaffold.rb', line 5 def setup @settings = {} @settings[:sdk] = ENV["MAKO_FLEX_SDK"] unless ENV["MAKO_FLEX_SDK"].nil? @settings[:dev_kit] = File.(File.dirname(__FILE__)+"/../")+"/lib/mako/data/" # inti defaults @default = {} @default[:sdk] = nil @default[:dev_kit] = File.(File.dirname(__FILE__)+"/../")+"/lib/mako/data/" @default[:app_class] = 'src/Engine.as' @default[:configs] = ['build.yaml'] @default[:target] = 'compiled_widget.swf' @default[:output_path] = File.("~")+"/mako_test_temp" @default[:stop_on_fail] = true @default[:type] = "html" @args = {} Dir.mkdir @default[:output_path] @scaffold = Scaffold.new(@settings, @default, @args) end |
#teardown ⇒ Object
37 38 39 |
# File 'lib/mako/test/test_scaffold.rb', line 37 def teardown # FileUtils.rm_rf(@default[:output_path]) end |
#test_create ⇒ Object
32 33 34 35 |
# File 'lib/mako/test/test_scaffold.rb', line 32 def test_create @scaffold.create "test" assert File.exists?(@default[:output_path]+"/test"), "Project folder isn't being created" end |
#test_initalize ⇒ Object
28 29 30 |
# File 'lib/mako/test/test_scaffold.rb', line 28 def test_initalize assert_instance_of(Scaffold, @scaffold) end |