abstracts 1.0.7 → 1.0.8

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: b1da9fe9f28ffb0bed7e02bdb186221a228cb0c1
4
- data.tar.gz: ff1e49905cdefa15e8f6e0a4904b2eaafb35aa5f
3
+ metadata.gz: b53b0e3dc42c128c3e6ba49a7e98d24fad47fb23
4
+ data.tar.gz: b6722f314754c08ea06f6c9506eb87a6b22fda45
5
5
  SHA512:
6
- metadata.gz: 9d906420f8e6641047e5075a0208e646f98b0560a2e7580b120e15be998ee38b8f100c38ee09897152bec19570a510b76cada1c0c21412272924e10af64e466d
7
- data.tar.gz: 229015cb90dddce3df0345ae9bba7b794d6970a9c88ba4928f71ffbf6748017c7b4c41a92ab4ca5d0b430691e72a8846940769783248954a9484d8ff37accd76
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
@@ -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.7
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