[macruby-changes] [1531] MacRuby/branches/experimental/spec/macruby
source_changes at macosforge.org
source_changes at macosforge.org
Mon May 4 18:27:37 PDT 2009
Revision: 1531
http://trac.macosforge.org/projects/ruby/changeset/1531
Author: lsansonetti at apple.com
Date: 2009-05-04 18:27:37 -0700 (Mon, 04 May 2009)
Log Message:
-----------
fixed a spec that didn't run on SL
Modified Paths:
--------------
MacRuby/branches/experimental/spec/macruby/cftype_spec.rb
MacRuby/branches/experimental/spec/macruby/spec_helper.rb
Modified: MacRuby/branches/experimental/spec/macruby/cftype_spec.rb
===================================================================
--- MacRuby/branches/experimental/spec/macruby/cftype_spec.rb 2009-05-05 01:27:14 UTC (rev 1530)
+++ MacRuby/branches/experimental/spec/macruby/cftype_spec.rb 2009-05-05 01:27:37 UTC (rev 1531)
@@ -4,7 +4,12 @@
describe "A CoreFoundation type" do
it "behaves like a regular Objective-C/Ruby object" do
o = CFBundleGetMainBundle()
- o.class.should == NSCFType
+ if MACOSX_VERSION <= 10.5
+ o.class.should == NSCFType
+ else
+ # __NSCFType isn't a constant in Ruby so we have to cheat.
+ o.class.should == NSClassFromString('__NSCFType')
+ end
o.inspect.class.should == String
end
Modified: MacRuby/branches/experimental/spec/macruby/spec_helper.rb
===================================================================
--- MacRuby/branches/experimental/spec/macruby/spec_helper.rb 2009-05-05 01:27:14 UTC (rev 1530)
+++ MacRuby/branches/experimental/spec/macruby/spec_helper.rb 2009-05-05 01:27:37 UTC (rev 1531)
@@ -52,3 +52,5 @@
load_bridge_support_file bridge_support
end
end
+
+MACOSX_VERSION = `sw_vers -productVersion`.to_f
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macruby-changes/attachments/20090504/e91ae905/attachment-0001.html>
More information about the macruby-changes
mailing list