[macruby-changes] [3844] MacRuby/trunk/spec/frozen/core/time/strftime_spec.rb

source_changes at macosforge.org source_changes at macosforge.org
Sat Mar 20 17:38:48 PDT 2010


Revision: 3844
          http://trac.macosforge.org/projects/ruby/changeset/3844
Author:   lsansonetti at apple.com
Date:     2010-03-20 17:38:47 -0700 (Sat, 20 Mar 2010)
Log Message:
-----------
mark a spec as not compliant on macruby (macosx's strftime() does not support GNU modificators)

Modified Paths:
--------------
    MacRuby/trunk/spec/frozen/core/time/strftime_spec.rb

Modified: MacRuby/trunk/spec/frozen/core/time/strftime_spec.rb
===================================================================
--- MacRuby/trunk/spec/frozen/core/time/strftime_spec.rb	2010-03-21 00:37:50 UTC (rev 3843)
+++ MacRuby/trunk/spec/frozen/core/time/strftime_spec.rb	2010-03-21 00:38:47 UTC (rev 3844)
@@ -165,29 +165,31 @@
   end
 
   ruby_version_is '1.9' do
-    it "supports GNU modificators" do
-      time = Time.local(2001, 2, 3, 4, 5, 6)
-
-      time.strftime('%^h').should == 'FEB'
-      time.strftime('%^_5h').should == '  FEB'
-      time.strftime('%0^5h').should == '00FEB'
-      time.strftime('%04H').should == '0004'
-      time.strftime('%0-^5h').should == 'FEB'
-      time.strftime('%_-^5h').should == 'FEB'
-      time.strftime('%^ha').should == 'FEBa'
-
-      expected = {
-        "%10h" => '       Feb',
-        "%^10h" => '       FEB',
-        "%_10h" => '       Feb',
-        "%_010h" => '0000000Feb',
-        "%0_10h" => '       Feb',
-        "%0_-10h" => 'Feb',
-        "%0-_10h" => 'Feb'
-      }
-
-      ["%10h","%^10h","%_10h","%_010h","%0_10h","%0_-10h","%0-_10h"].each do |format|
-        time.strftime(format).should == expected[format]
+    not_compliant_on :macruby do
+      it "supports GNU modificators" do
+        time = Time.local(2001, 2, 3, 4, 5, 6)
+  
+        time.strftime('%^h').should == 'FEB'
+        time.strftime('%^_5h').should == '  FEB'
+        time.strftime('%0^5h').should == '00FEB'
+        time.strftime('%04H').should == '0004'
+        time.strftime('%0-^5h').should == 'FEB'
+        time.strftime('%_-^5h').should == 'FEB'
+        time.strftime('%^ha').should == 'FEBa'
+  
+        expected = {
+          "%10h" => '       Feb',
+          "%^10h" => '       FEB',
+          "%_10h" => '       Feb',
+          "%_010h" => '0000000Feb',
+          "%0_10h" => '       Feb',
+          "%0_-10h" => 'Feb',
+          "%0-_10h" => 'Feb'
+        }
+  
+        ["%10h","%^10h","%_10h","%_010h","%0_10h","%0_-10h","%0-_10h"].each do |format|
+          time.strftime(format).should == expected[format]
+        end
       end
     end
   end
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macruby-changes/attachments/20100320/b851ebd7/attachment-0001.html>


More information about the macruby-changes mailing list