spec/spec.sane.rb in sane-0.24.5 vs spec/spec.sane.rb in sane-0.24.6
- old
+ new
@@ -3,10 +3,11 @@
require File.dirname(__FILE__) + '/../lib/sane'
begin
require 'spec/autorun'
rescue LoadError
require 'rspec'
+ require 'rspec/autorun'
end
require 'fileutils'
class Object
@@ -185,8 +186,16 @@
"abc".replace_all!("def").should == "def"
end
it 'should have socket get_host_ips' do
Socket.get_local_ips[0].should_not be nil
+ end
+
+ it 'should have present? method' do
+ assert !(''.present?)
+ assert 'a'.present?
+ assert !([].present?)
+ assert ['a'].present?
+ assert !(nil.present?)
end
end