Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Integrated ProjectSprouts prelease support
- Loading branch information
Showing
18 changed files
with
328 additions
and
83 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
source :rubygems | ||
|
||
gem 'flashsdk', '>= 1.0.2.pre' | ||
|
||
group :development do | ||
gem "shoulda" | ||
gem "mocha" | ||
end | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1,20 @@ | ||
# -*- encoding: utf-8 -*- | ||
|
||
require File.dirname(__FILE__) + '/config/version' | ||
require File.join(File.dirname(__FILE__), 'sprout', 'lib', 'asunit4') | ||
require 'rake' | ||
|
||
# This file is actually executed from dist/ | ||
# Check the rakefile.rb for more information. | ||
|
||
Gem::Specification.new do |s| | ||
s.name = "sprout-asunit4" | ||
s.version = AsUnit::VERSION | ||
s.platform = Gem::Platform::RUBY | ||
s.authors = ["Luke Bayes, Ali Mills and Robert Penner"] | ||
s.email = ["asunit-users@lists.sourceforge.net"] | ||
s.homepage = "http://asunit.org" | ||
s.summary = "The fastest and most flexible ActionScript unit test framework" | ||
s.description = "AsUnit is the only ActionScript unit test framework that support every development and runtime environment that is currently available. This includes Flex 2, 3, 4, AIR 1 and 2, Flash Lite, and of course the Flash Authoring tool" | ||
|
||
s.name = AsUnit::NAME | ||
s.version = AsUnit::VERSION | ||
s.platform = Gem::Platform::RUBY | ||
s.authors = ["Luke Bayes", "Ali Mills", "Robert Penner"] | ||
s.email = ["asunit-users@lists.sourceforge.net"] | ||
s.homepage = "http://asunit.org" | ||
s.summary = "The fastest and most flexible ActionScript unit test framework" | ||
s.description = "AsUnit is the only ActionScript unit test framework that support every development and runtime environment that is currently available. This includes Flex 2, 3, 4, AIR 1 and 2, Flash Lite, and of course the Flash Authoring tool" | ||
s.rubyforge_project = "sprout" | ||
s.required_rubygems_version = ">= 1.3.6" | ||
s.rubyforge_project = "sprout" | ||
|
||
included_files = FileList["**/*"].exclude /.DS_Store|generated|.svn|.git|airglobal.swc|airframework.swc/ | ||
|
||
s.files = included_files | ||
s.require_path = 'config' | ||
s.require_path = "sprout/lib" | ||
s.files = FileList["**/*"].exclude /docs|.DS_Store|generated|.svn|.git|airglobal.swc|airframework.swc/ | ||
end | ||
|
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
require 'flashsdk' | ||
|
||
$:.unshift File.dirname(__FILE__) | ||
|
||
module AsUnit | ||
NAME = 'asunit4' | ||
VERSION = '4.2.1.pre' | ||
end | ||
|
||
require 'asunit4/test_class_generator' | ||
require 'asunit4/suite_class_generator' | ||
|
||
Sprout::Specification.new do |s| | ||
s.name = AsUnit::NAME | ||
s.version = AsUnit::VERSION | ||
s.add_file_target do |f| | ||
f.add_library :swc, File.join('..', '..', 'bin', "AsUnit-#{AsUnit::VERSION}.swc") | ||
# Removed the src compilation for now, b/c it requires additional compiler | ||
# configuration - like keep-as3-metadata... | ||
#f.add_library :src, [File.join(path, 'src'), File.join(path, 'vendor/as3reflection')] | ||
end | ||
end | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
module AsUnit4 | ||
class SuiteClassGenerator < FlashSDK::ClassGenerator | ||
include FlashSDK::FlashHelper | ||
|
||
def initialize | ||
super | ||
self.input = 'AllTests.as' | ||
end | ||
|
||
def manifest | ||
directory test do | ||
template input, 'AsUnit4SuiteClass.as' | ||
end | ||
end | ||
end | ||
end | ||
|
18 changes: 18 additions & 0 deletions
18
asunit-4.0/sprout/lib/asunit4/templates/AsUnit4SuiteClass.as
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
package { | ||
/** | ||
* This file has been automatically created using | ||
* #!/usr/bin/ruby script/generate suite | ||
* If you modify it and run this script, your | ||
* modifications will be lost! | ||
*/ | ||
<% test_case_classes.each do |test_case| %>import <%= test_case %>; | ||
<% end %> | ||
|
||
[Suite] | ||
public class AllTests { | ||
<% test_case_classes.each do |test_case| %>public var <%= test_case.gsub('.', '_') %>:<%= test_case %>; | ||
<% end %> | ||
|
||
} | ||
} | ||
|
33 changes: 33 additions & 0 deletions
33
asunit-4.0/sprout/lib/asunit4/templates/AsUnit4TestClass.as
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
package <%= package_name %> { | ||
|
||
import asunit.asserts.*; | ||
import asunit.framework.IAsync; | ||
import flash.display.Sprite; | ||
|
||
public class <%= test_class_name %> { | ||
|
||
[Inject] | ||
public var async:IAsync; | ||
|
||
[Inject] | ||
public var context:Sprite; | ||
|
||
private var <%= instance_name %>:<%= class_name %>; | ||
|
||
[Before] | ||
public function setUp():void { | ||
<%= instance_name %> = new <%= class_name %>(); | ||
} | ||
|
||
[After] | ||
public function tearDown():void { | ||
<%= instance_name %> = null; | ||
} | ||
|
||
[Test] | ||
public function shouldBeInstantiated():void { | ||
assertTrue("<%= instance_name %> is <%= class_name %>", <%= instance_name %> is <%= class_name %>); | ||
} | ||
} | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
|
||
module AsUnit4 | ||
class TestClassGenerator < FlashSDK::ClassGenerator | ||
|
||
def manifest | ||
directory test_class_directory do | ||
template "#{test_class_name}.as", 'AsUnit4TestClass.as' | ||
end | ||
|
||
generator :suite_class | ||
end | ||
|
||
end | ||
end | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
package { | ||
/** | ||
* This file has been automatically created using | ||
* #!/usr/bin/ruby script/generate suite | ||
* If you modify it and run this script, your | ||
* modifications will be lost! | ||
*/ | ||
import utils.MathUtilTest; | ||
[Suite] | ||
public class AllTests { | ||
public var utils_MathUtilTest:utils.MathUtilTest; } | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
package { | ||
/** | ||
* This file has been automatically created using | ||
* #!/usr/bin/ruby script/generate suite | ||
* If you modify it and run this script, your | ||
* modifications will be lost! | ||
*/ | ||
import utils.MathUtilTest; | ||
[Suite] | ||
public class AllTests { | ||
public var utils_MathUtilTest:utils.MathUtilTest; } | ||
} | ||
|
Oops, something went wrong.