crazy_money 1.1.0 → 1.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +1 -1
- data/crazy_money.gemspec +1 -1
- data/lib/crazy_money.rb +4 -0
- data/spec/crazy_money_spec.rb +11 -6
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 12d32e285aa7e2ce6a53feee1d214718ad5df46d
|
4
|
+
data.tar.gz: fcaa7be42922ae7fc23b1143cfdb4b496edf05ab
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: cce29b0c6b9ebae13e85ffefc8ed7b10cb290b4934895397ec054199672b221a0a95ccf997157146bd273061667d379d764e25c37ca3b97b4a57eee01ad1ef71
|
7
|
+
data.tar.gz: 8c492358bd8c5e5fb0e223d1671800aa440d12d902f6899c437cd3427e7b6c9879c2f200c33d98cf3b2392d37cdf46b3a33cfa15cda0f8736ea3461302149866
|
data/.travis.yml
CHANGED
data/crazy_money.gemspec
CHANGED
@@ -4,7 +4,7 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
|
4
4
|
|
5
5
|
Gem::Specification.new do |spec|
|
6
6
|
spec.name = "crazy_money"
|
7
|
-
spec.version = "1.1.
|
7
|
+
spec.version = "1.1.1"
|
8
8
|
spec.authors = ["Cédric Félizard"]
|
9
9
|
spec.email = ["cedric@felizard.fr"]
|
10
10
|
spec.description = %q{Simple money wrapper}
|
data/lib/crazy_money.rb
CHANGED
data/spec/crazy_money_spec.rb
CHANGED
@@ -17,11 +17,16 @@ describe CrazyMoney do
|
|
17
17
|
specify { expect(CrazyMoney.new(one_third).to_s).to eq("0.33") }
|
18
18
|
end
|
19
19
|
|
20
|
+
describe "#inspect" do
|
21
|
+
specify { expect(CrazyMoney.new(0).inspect).to eq("#<CrazyMoney amount=0.00>") }
|
22
|
+
specify { expect(CrazyMoney.new("-13.37").inspect).to eq("#<CrazyMoney amount=-13.37>") }
|
23
|
+
end
|
24
|
+
|
20
25
|
describe "#==" do
|
21
|
-
specify { expect(CrazyMoney.new(0) == 0).to
|
22
|
-
specify { expect(CrazyMoney.new(one_third) == one_third).to
|
23
|
-
specify { expect(CrazyMoney.new("1.23456789") == 1.23456789).to
|
24
|
-
specify { expect(CrazyMoney.new(1.23456789) == 1.23456789).to
|
26
|
+
specify { expect(CrazyMoney.new(0) == 0).to be true }
|
27
|
+
specify { expect(CrazyMoney.new(one_third) == one_third).to be true }
|
28
|
+
specify { expect(CrazyMoney.new("1.23456789") == 1.23456789).to be true }
|
29
|
+
specify { expect(CrazyMoney.new(1.23456789) == 1.23456789).to be true }
|
25
30
|
end
|
26
31
|
|
27
32
|
describe "arithmetic operations" do
|
@@ -88,8 +93,8 @@ describe CrazyMoney do
|
|
88
93
|
end
|
89
94
|
|
90
95
|
describe "comparison" do
|
91
|
-
specify { expect(CrazyMoney.new(10) > 0).to
|
92
|
-
specify { expect(CrazyMoney.new(10) > CrazyMoney.new(0)).to
|
96
|
+
specify { expect(CrazyMoney.new(10) > 0).to be true }
|
97
|
+
specify { expect(CrazyMoney.new(10) > CrazyMoney.new(0)).to be true }
|
93
98
|
|
94
99
|
specify { expect([0, CrazyMoney.new(10)].max).to eq(10) }
|
95
100
|
specify { expect([CrazyMoney.new(0), CrazyMoney.new(10)].max).to eq(10) }
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: crazy_money
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.1.
|
4
|
+
version: 1.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Cédric Félizard
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-
|
11
|
+
date: 2014-06-25 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: currency_data
|
@@ -103,7 +103,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
103
103
|
version: '0'
|
104
104
|
requirements: []
|
105
105
|
rubyforge_project:
|
106
|
-
rubygems_version: 2.2.
|
106
|
+
rubygems_version: 2.2.2
|
107
107
|
signing_key:
|
108
108
|
specification_version: 4
|
109
109
|
summary: Crazy Money
|