active_payment 0.0.7 → 0.0.8

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 802713aa845ccaf37f36d64171c915b8489d7b63
4
- data.tar.gz: cae4d7786057482b56e7fb39a3e9cc15b9b756e9
3
+ metadata.gz: c4f56028a3c36cad165bf1c617ef183a3818d502
4
+ data.tar.gz: 82c5dd80c4e2a4649d783e47023d07679e83308d
5
5
  SHA512:
6
- metadata.gz: 3ffd5a1404ee78d749f10c414bbe432b305be779b01ea65c432397f3d2731494e12a097911eb1d63d4641acd33b65de6ee5e8e6566f4dab9dd18f9c50123516e
7
- data.tar.gz: 9143e0999b7974fce693c14fa193520da63d3a6ff881a0d7a7cfbe4a5f5340ccf1409d9d5b4c6fb3a0a57e7b995bfa7576a2849dc5eba2a91288f6a128c764a7
6
+ metadata.gz: 66fa5109b7a33754581e29ba9f2d1eb8e20085a4869a023d6a7299ae5e75db80bfa2309cba69dcb824f824cb14cff9d6431bf0f39b441f1bce877500f5e97790
7
+ data.tar.gz: 66c78b1e0ecd774065de7a8ab92f0dee0585f43e3fd1f2465cb9875d18bb5eab6fab79622035257630abb7e35eb7b66229c33ac44f5c143ae27cf3d6f062ccf4
@@ -10,5 +10,11 @@ module ActivePayment
10
10
  @ip_security = false
11
11
  @test = false
12
12
  end
13
+
14
+ def test=(value)
15
+ @test = value and return if !!value == value
16
+
17
+ @test = (value == 'true' ? true : false)
18
+ end
13
19
  end
14
20
  end
@@ -1,3 +1,3 @@
1
1
  module ActivePayment
2
- VERSION = '0.0.7'
2
+ VERSION = '0.0.8'
3
3
  end
@@ -56,4 +56,20 @@ describe ActivePayment::Configuration do
56
56
  @configuration.test = true
57
57
  expect(@configuration.test).to be true
58
58
  end
59
+
60
+ it 'set test with a boolean value' do
61
+ @configuration.test = true
62
+ expect(@configuration.test).to be true
63
+
64
+ @configuration.test = false
65
+ expect(@configuration.test).to be false
66
+ end
67
+
68
+ it 'set test with a string value' do
69
+ @configuration.test = "true"
70
+ expect(@configuration.test).to be true
71
+
72
+ @configuration.test = "false"
73
+ expect(@configuration.test).to be false
74
+ end
59
75
  end
Binary file