Skip to content
This repository
Browse code

Fix a bunch of specs on Solaris

  • Loading branch information...
commit ac7ca51b22fa8e5891a69d8b67f71a8616cfea4c 1 parent 05051c2
Dirkjan Bussink dbussink authored brixen committed
18 core/dir/shared/delete.rb
@@ -29,10 +29,20 @@
29 29 end
30 30 end
31 31
32   - it "raises an Errno::ENOTEMPTY when trying to remove a nonempty directory" do
33   - lambda do
34   - Dir.send @method, DirSpecs.mock_rmdir("nonempty")
35   - end.should raise_error(Errno::ENOTEMPTY)
  32 + platform_is_not :solaris do
  33 + it "raises an Errno::ENOTEMPTY when trying to remove a nonempty directory" do
  34 + lambda do
  35 + Dir.send @method, DirSpecs.mock_rmdir("nonempty")
  36 + end.should raise_error(Errno::ENOTEMPTY)
  37 + end
  38 + end
  39 +
  40 + platform_is :solaris do
  41 + it "raises an Errno::EEXIST when trying to remove a nonempty directory" do
  42 + lambda do
  43 + Dir.send @method, DirSpecs.mock_rmdir("nonempty")
  44 + end.should raise_error(Errno::EEXIST)
  45 + end
36 46 end
37 47
38 48 it "raises an Errno::ENOENT when trying to remove a non-existing directory" do
37 core/math/atan2_spec.rb
@@ -43,17 +43,42 @@
43 43 Math.atan2(0.0, 0.0).should be_positive_zero
44 44 end
45 45
46   - it "returns negative zero when passed -0.0, 0.0" do
47   - Math.atan2(-0.0, 0.0).should be_negative_zero
  46 + platform_is_not :solaris do
  47 + it "returns negative zero when passed -0.0, 0.0" do
  48 + Math.atan2(-0.0, 0.0).should be_negative_zero
  49 + end
48 50 end
49 51
50   - it "returns Pi when passed 0.0, -0.0" do
51   - Math.atan2(0.0, -0.0).should == Math::PI
  52 + platform_is :solaris do
  53 + it "returns positive zero when passed -0.0, 0.0" do
  54 + Math.atan2(-0.0, 0.0).should be_positive_zero
  55 + end
52 56 end
53 57
54   - it "returns -Pi when passed -0.0, -0.0" do
55   - Math.atan2(-0.0, -0.0).should == -Math::PI
  58 + platform_is_not :solaris do
  59 + it "returns Pi when passed 0.0, -0.0" do
  60 + Math.atan2(0.0, -0.0).should == Math::PI
  61 + end
56 62 end
  63 +
  64 + platform_is :solaris do
  65 + it "returns positive zero when passed 0.0, -0.0" do
  66 + Math.atan2(0.0, -0.0).should be_positive_zero
  67 + end
  68 + end
  69 +
  70 + platform_is_not :solaris do
  71 + it "returns -Pi when passed -0.0, -0.0" do
  72 + Math.atan2(-0.0, -0.0).should == -Math::PI
  73 + end
  74 + end
  75 +
  76 + platform_is :solaris do
  77 + it "returns positive zero when passed -0.0, -0.0" do
  78 + Math.atan2(-0.0, -0.0).should be_positive_zero
  79 + end
  80 + end
  81 +
57 82 end
58 83
59 84 describe "Math#atan2" do
8 shared/file/zero.rb
@@ -34,12 +34,18 @@
34 34 end
35 35 end
36 36
37   - platform_is_not :windows do
  37 + platform_is_not :windows, :solaris do
38 38 it "returns true for /dev/null" do
39 39 @object.send(@method, '/dev/null').should == true
40 40 end
41 41 end
42 42
  43 + platform_is :solaris do
  44 + it "returns false for /dev/null" do
  45 + @object.send(@method, '/dev/null').should == false
  46 + end
  47 + end
  48 +
43 49 it "raises an ArgumentError if not passed one argument" do
44 50 lambda { File.zero? }.should raise_error(ArgumentError)
45 51 end

0 comments on commit ac7ca51

Please sign in to comment.
Something went wrong with that request. Please try again.