sane 0.12.2 → 0.14.0

Sign up to get free protection for your applications and to get access to all the features.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.12.2
1
+ 0.14.0
data/lib/sane/contain.rb CHANGED
@@ -1,5 +1,3 @@
1
1
  class String
2
- def contain? something
3
- include? something
4
- end
2
+ alias :contain? :include?
5
3
  end
@@ -71,12 +71,6 @@ class Object
71
71
  puts
72
72
  end
73
73
 
74
- def aliash hash
75
- hash.each_pair {|new, old|
76
- alias_method new, old
77
- }
78
- end
79
-
80
74
  def singleton_class
81
75
  class << self; self; end
82
76
  end
data/sane.gemspec CHANGED
@@ -5,7 +5,7 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{sane}
8
- s.version = "0.12.2"
8
+ s.version = "0.14.0"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Roger Pack"]
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 that outputs " do
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
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sane
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.12.2
4
+ version: 0.14.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Roger Pack