Sha256: e67dd999430ee8c8ecb38ad9765047f2b11c9c2a3c54a4c9f7fedc81df61e8ea
Contents?: true
Size: 1.17 KB
Versions: 42
Compression:
Stored size: 1.17 KB
Contents
require 'test_helper' class FlashHelperTest < Test::Unit::TestCase include Sprout::TestHelper context "A FlashHelper" do [ { :input => 'com.foo.Bar', :expected => 'com.foo.Bar' }, { :input => 'com/foo/Bar.as', :expected => 'com.foo.Bar' }, { :input => 'com.out.HTML', :expected => 'com.out.HTML' } #{ :input => 'bar', :expected => 'Bar' } ].each do |input| should "return fully qualified classname for #{input[:input]}" do instance = FakeGenerator.new instance.input = input[:input] assert_equal input[:expected], instance.fake_fully_qualified_class_name end end should "work if :src is not defined" do instance = FakeGenerator.new instance.input = 'com/foo/bar.as' assert_equal ["com","foo","bar"], instance.fake_input_in_parts assert_equal ["com","foo","mommy"], instance.fake_input_in_parts("com.foo.mommy.mxml") end end end class FakeGenerator < Sprout::Generator::Base include FlashSDK::FlashHelper def fake_fully_qualified_class_name fully_qualified_class_name end def fake_input_in_parts value=nil input_in_parts value end end
Version data entries
42 entries across 42 versions & 3 rubygems
Version | Path |
---|---|
flashsdk-1.0.15.pre | test/unit/flash_helper_test.rb |
flashsdk-1.0.14.pre | test/unit/flash_helper_test.rb |