abstracts 1.0.7 → 1.0.8
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/spec/abstracts_spec.rb +53 -0
- data/spec/spec_helper.rb +1 -0
- metadata +3 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b53b0e3dc42c128c3e6ba49a7e98d24fad47fb23
|
4
|
+
data.tar.gz: b6722f314754c08ea06f6c9506eb87a6b22fda45
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e9458fa631f9706595d6cc55d928f52b61a4c0b28a439f697c99694dcefabbdc22f48f1fe4577a884cfed9cc6cde64ce61fd538e45a77e92b7617926c8338260
|
7
|
+
data.tar.gz: 583c39c6bf11f1398145e941d00dd9e5ac67f9e57087a71246bde3c8a4e7d5f335c4ee79545ff97f69ee08cb63fc9f5093b3baae367766fc5bc8c6d1dfbf0f61
|
@@ -0,0 +1,53 @@
|
|
1
|
+
describe '.blank?' do
|
2
|
+
before do
|
3
|
+
Object.include Abstract::Extensions::Object
|
4
|
+
end
|
5
|
+
|
6
|
+
context 'when self = String.new' do
|
7
|
+
it 'String.new.blank? expected to be true' do
|
8
|
+
expect(String.new.blank?).to eq true
|
9
|
+
end
|
10
|
+
end
|
11
|
+
|
12
|
+
context 'when self = Hash.new' do
|
13
|
+
it 'Hash.new.blank? expected to be true' do
|
14
|
+
expect(Hash.new.blank?).to eq true
|
15
|
+
end
|
16
|
+
end
|
17
|
+
|
18
|
+
context 'when self = Array.new' do
|
19
|
+
it 'Array.new.blank? expected to be true' do
|
20
|
+
expect(Array.new.blank?).to eq true
|
21
|
+
end
|
22
|
+
end
|
23
|
+
|
24
|
+
context 'when self = "foo"' do
|
25
|
+
it 'foo.blank? expected to be false' do
|
26
|
+
expect('foo'.blank?).to eq false
|
27
|
+
end
|
28
|
+
end
|
29
|
+
|
30
|
+
context "when self = {qwe: 'rty'}" do
|
31
|
+
it "{foo: 'bar'}.blank? expected to be false" do
|
32
|
+
expect({foo: 'bar'}.blank?).to eq false
|
33
|
+
end
|
34
|
+
end
|
35
|
+
|
36
|
+
context "when self = ['foo', 'bar']" do
|
37
|
+
it "['foo', 'bar'].blank? expected to be false" do
|
38
|
+
expect(%w[foo bar].blank?).to eq false
|
39
|
+
end
|
40
|
+
end
|
41
|
+
|
42
|
+
context 'when self = Hash' do
|
43
|
+
it 'Hash.blank? expected to be false' do
|
44
|
+
expect(Hash.blank?).to eq false
|
45
|
+
end
|
46
|
+
end
|
47
|
+
|
48
|
+
context 'when self = String' do
|
49
|
+
it 'String.blank? expected to be false' do
|
50
|
+
expect(String.blank?).to eq false
|
51
|
+
end
|
52
|
+
end
|
53
|
+
end
|
data/spec/spec_helper.rb
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
require_relative '../lib/abstracts.rb'
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: abstracts
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.8
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Vsevolod Suzdaltsev
|
@@ -17,6 +17,8 @@ extensions: []
|
|
17
17
|
extra_rdoc_files: []
|
18
18
|
files:
|
19
19
|
- lib/abstracts.rb
|
20
|
+
- spec/abstracts_spec.rb
|
21
|
+
- spec/spec_helper.rb
|
20
22
|
homepage: http://rubygems.org/gems/abstracts
|
21
23
|
licenses:
|
22
24
|
- MIT
|