settingson 1.3.2 → 1.3.3

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: 0752abcd5f9b547030d3b6dba21da1eb6b089154
4
- data.tar.gz: c0225eecd8deae31e29b2c53998b82f4fb55618e
3
+ metadata.gz: 6a77885b41ca726f823a234d80a0c44050fb73e9
4
+ data.tar.gz: e1a4139d33964310e1a3e25bd4944f4376919f6f
5
5
  SHA512:
6
- metadata.gz: 847c4da786c0c542715c77496a21a5deafe565a134d1473859b4d3a7b421763f6e2ee02dee4f85535d86840feee4f098c93d781b52c43f7b63a86250e7ed99a4
7
- data.tar.gz: b7627dac777a30f9c2be130596b6a3b7825e2a915ca78c89dbf253cfbc66abb8172a7bde7d2101e533cf4ef671d0ad2193a32bd42614d51ff12151324da9f1db
6
+ metadata.gz: bb589bb44a7d0c460d0c23024ee465c7477aa843ec39dbd9f774a0eb8f1c308ffd41cfe327cf7a3eb4233b6f19616b6694a074f90dae8f1d746ef56919de9ec6
7
+ data.tar.gz: 9d569fefd9845fea7d5ae67bbf21b4695cfe17c2414ffb696343fe8d0a28057479a8e89b7b1cc42539bb24197fcbb48ed40e7b19d92154e73e9db9cc7e9898c2
@@ -1,3 +1,3 @@
1
1
  module Settingson
2
- VERSION = "1.3.2"
2
+ VERSION = "1.3.3"
3
3
  end
@@ -13,7 +13,7 @@ Rails.application.configure do
13
13
  config.eager_load = false
14
14
 
15
15
  # Configure static asset server for tests with Cache-Control for performance.
16
- config.serve_static_assets = true
16
+ config.serve_static_files = true
17
17
  config.static_cache_control = 'public, max-age=3600'
18
18
 
19
19
  # Show full error reports and disable caching.
@@ -7,32 +7,58 @@ describe Settings do
7
7
  it 'not raises error on create new element' do
8
8
  expect{ Settings.hello = Faker::Lorem.word }.to_not raise_error
9
9
  end
10
- it 'returns same value' do
10
+ it 'returns same Fixnum' do
11
+ word = Faker::Lorem.word
12
+ Settings.number = 100
13
+ expect( Settings.number ).to eq(100)
14
+ end
15
+ it 'returns same String' do
11
16
  word = Faker::Lorem.word
12
17
  Settings.hello = word
13
18
  expect( Settings.hello ).to eq(word)
14
19
  end
15
- it 'returns same value for composit (1)' do
20
+ it 'returns same value for complex key #1' do
16
21
  word = Faker::Lorem.word
17
22
  Settings.hello.hello = word
18
23
  expect( Settings.hello.hello ).to eq(word)
19
24
  end
20
- it 'returns same value for composit (2)' do
25
+ it 'returns same value for complex key #2' do
21
26
  word = Faker::Lorem.word
22
27
  Settings.i.hello = word
23
28
  expect( Settings.i.hello ).to eq(word)
24
29
  end
25
30
 
26
- it 'destroys record with nil value (1)' do
31
+ it 'destroys record with nil value #1' do
27
32
  word = Faker::Lorem.word
28
33
  Settings.some = word
29
34
  expect{ Settings.some = nil }.to change{ Settings.count }.by(-1)
30
35
  end
31
36
 
32
- it 'destroys record with nil value (2)' do
37
+ it 'destroys record with nil value #2' do
33
38
  word = Faker::Lorem.word
34
39
  Settings.some.hello = word
35
40
  expect{ Settings.some.hello = nil }.to change{ Settings.count }.by(-1)
36
41
  end
37
42
 
38
- end
43
+ describe 'with empty value' do
44
+ it 'returns empty string' do
45
+ expect( "#{Settings.not_found}" ).to eq("")
46
+ end
47
+
48
+ it 'returns value.nil? is true' do
49
+ expect( Settings.not_found.nil? ).to be(true)
50
+ end
51
+
52
+ it 'returns value.empty? is true' do
53
+ expect( Settings.not_found.empty? ).to be(true)
54
+ end
55
+
56
+ it 'returns value.blank? is true' do
57
+ expect( Settings.not_found.blank? ).to be(true)
58
+ end
59
+
60
+ it 'returns value.present? is false' do
61
+ expect( Settings.not_found.present? ).to be(false)
62
+ end
63
+ end
64
+ end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: settingson
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.3.2
4
+ version: 1.3.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - dan
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-07-28 00:00:00.000000000 Z
11
+ date: 2015-09-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails