[macruby-changes] [800] MacRuby/trunk/test-macruby/cases/hotcocoa
source_changes at macosforge.org
source_changes at macosforge.org
Tue Jan 20 12:09:22 PST 2009
Revision: 800
http://trac.macosforge.org/projects/ruby/changeset/800
Author: eloy.de.enige at gmail.com
Date: 2009-01-20 12:09:22 -0800 (Tue, 20 Jan 2009)
Log Message:
-----------
The previous patches were a patch by Vincent Isambart, and test cases by Alexander Flatter, for HotCocoa.
Some small cleanups.
Modified Paths:
--------------
MacRuby/trunk/test-macruby/cases/hotcocoa/mapper_test.rb
MacRuby/trunk/test-macruby/cases/hotcocoa/mappings_test.rb
Modified: MacRuby/trunk/test-macruby/cases/hotcocoa/mapper_test.rb
===================================================================
--- MacRuby/trunk/test-macruby/cases/hotcocoa/mapper_test.rb 2009-01-20 20:09:12 UTC (rev 799)
+++ MacRuby/trunk/test-macruby/cases/hotcocoa/mapper_test.rb 2009-01-20 20:09:22 UTC (rev 800)
@@ -29,7 +29,7 @@
end
it "should convert from camelcase to underscore" do
- assert sample_mapper.underscore("SampleCamelCasedWord"), 'sample_camel_cased_word'
+ assert sample_mapper.underscore("SampleCamelCasedWord"), 'sample_camel_cased_word'
end
def test_include_in_class
Modified: MacRuby/trunk/test-macruby/cases/hotcocoa/mappings_test.rb
===================================================================
--- MacRuby/trunk/test-macruby/cases/hotcocoa/mappings_test.rb 2009-01-20 20:09:12 UTC (rev 799)
+++ MacRuby/trunk/test-macruby/cases/hotcocoa/mappings_test.rb 2009-01-20 20:09:22 UTC (rev 800)
@@ -24,7 +24,7 @@
end
it "should create a mapping to a class with #map" do
-
+
block = Proc.new do
def alloc_with_options(options); options; end
end
@@ -40,39 +40,30 @@
end
it "should create a mapping to a class for a framework with #map" do
-
p = Proc.new {}
-
HotCocoa::Mappings.map({:foo => :SampleClass, :framework => :Anonymous}, &p)
+ # require 'pp'; pp HotCocoa::Mappings
- require 'pp'; pp HotCocoa::Mappings
-
# FIXME: This is not really nice. We test that the result exists, but not what it is.
assert_equal Mappings.frameworks["anonymous"].size, 1
-
end
it "should call the framework's callbacks if it's passed to #framework_loaded" do
-
p = Proc.new { SampleClass.val = true }
-
Mappings.on_framework(:Foo, &p)
Mappings.framework_loaded(:Foo)
-
+
assert_equal SampleClass.val, true
-
end
it "should raise nothing if there's no entry for the framework passed to #framework_loaded" do
-
assert_nothing_raised do
Mappings.framework_loaded(:FrameworkDoesNotExist)
end
-
end
def test_reload
flunk 'Pending.'
end
-
+
end
\ No newline at end of file
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macruby-changes/attachments/20090120/5793fdac/attachment.html>
More information about the macruby-changes
mailing list