sane 0.12.2 → 0.14.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/VERSION +1 -1
- data/lib/sane/contain.rb +1 -3
- data/lib/sane/sane_random.rb +0 -6
- data/sane.gemspec +1 -1
- data/spec/test_sane.spec +14 -15
- metadata +1 -1
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.
|
1
|
+
0.14.0
|
data/lib/sane/contain.rb
CHANGED
data/lib/sane/sane_random.rb
CHANGED
data/sane.gemspec
CHANGED
data/spec/test_sane.spec
CHANGED
@@ -25,11 +25,6 @@ describe Sane do
|
|
25
25
|
|
26
26
|
class A
|
27
27
|
def go; 3; end
|
28
|
-
aliash :go2 => :go
|
29
|
-
end
|
30
|
-
|
31
|
-
it "should aliaz right" do
|
32
|
-
A.new.go2.should == 3
|
33
28
|
end
|
34
29
|
|
35
30
|
it "should have a singleton_class method" do
|
@@ -65,20 +60,12 @@ describe Sane do
|
|
65
60
|
end
|
66
61
|
|
67
62
|
# my first implementation of this was *awful* LOL
|
63
|
+
# leave out for now
|
68
64
|
# it "should allow for brackets on enumerators" do
|
69
65
|
# require 'backports' # ugh
|
70
66
|
# assert "ab\r\nc".lines[0] == "ab\r\n"
|
71
67
|
# end
|
72
68
|
|
73
|
-
it "should have a windows method" do
|
74
|
-
require 'rbconfig'
|
75
|
-
if RbConfig::CONFIG['host_os'] =~ /mswin|mingw/
|
76
|
-
assert OS.windows?
|
77
|
-
else
|
78
|
-
refute OS.windows?
|
79
|
-
end
|
80
|
-
end
|
81
|
-
|
82
69
|
it "should have good looking float#inspect" do
|
83
70
|
assert( (1.1 - 0.9).inspect.include? '0.2000000' ) # 0.20000000000000006661 or something close to it
|
84
71
|
end
|
@@ -91,7 +78,7 @@ describe Sane do
|
|
91
78
|
[1,2,3].ave.should == 2
|
92
79
|
end
|
93
80
|
|
94
|
-
it "should have an sputs method
|
81
|
+
it "should have an sputs method " do
|
95
82
|
sputs 1,2,3
|
96
83
|
end
|
97
84
|
|
@@ -105,5 +92,17 @@ describe Sane do
|
|
105
92
|
assert "a".contain? "a"
|
106
93
|
assert !("a".contain? "b")
|
107
94
|
end
|
95
|
+
|
96
|
+
it "should have include and contain for arrays" do
|
97
|
+
assert ['a'].include? "a"
|
98
|
+
assert ['a'].contain? "a"
|
99
|
+
end
|
100
|
+
|
101
|
+
it "should have blank? and empty? for arrays and strings" do
|
102
|
+
assert ''.blank?
|
103
|
+
assert ''.empty?
|
104
|
+
assert [].blank?
|
105
|
+
assert [].empty?
|
106
|
+
end
|
108
107
|
|
109
108
|
end
|