bd_money 0.0.13 → 0.0.14
Sign up to get free protection for your applications and to get access to all the features.
- data/VERSION +1 -1
- data/bd_money.gemspec +1 -1
- data/lib/bd_money/bd_money.rb +1 -1
- data/lib/bd_money/rails.rb +5 -0
- data/spec/rails_spec.rb +9 -0
- metadata +3 -3
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.0.
|
1
|
+
0.0.14
|
data/bd_money.gemspec
CHANGED
data/lib/bd_money/bd_money.rb
CHANGED
data/lib/bd_money/rails.rb
CHANGED
data/spec/rails_spec.rb
CHANGED
@@ -81,5 +81,14 @@ describe Money do
|
|
81
81
|
it { subject.amount.amount.to_s('F').should == '300.0' }
|
82
82
|
it { subject.apr.amount.to_s('F').should == '0.1234' }
|
83
83
|
end
|
84
|
+
|
85
|
+
describe "should provide valid json encoding" do
|
86
|
+
subject { BetterLoanExample.new :amount => 300, :apr => 0.123456789 }
|
87
|
+
it { subject.amount.as_json.should == '300.00' }
|
88
|
+
it { subject.apr.as_json.should == '0.1234' }
|
89
|
+
it { subject.as_json.should == {"apr"=>0.1234, "amount"=>300.00} }
|
90
|
+
it { subject.to_json.should == '{"apr":0.1234,"amount":300.00}' }
|
91
|
+
end
|
92
|
+
|
84
93
|
end
|
85
94
|
end
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: bd_money
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 3
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 0
|
9
|
-
-
|
10
|
-
version: 0.0.
|
9
|
+
- 14
|
10
|
+
version: 0.0.14
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Adrian Madrid
|