inflation 0.1.2 → 0.1.3
Sign up to get free protection for your applications and to get access to all the features.
- data/inflation.gemspec +1 -1
- data/lib/inflation/inflation.rb +1 -1
- data/lib/inflation/version.rb +1 -1
- data/spec/inflation_spec.rb +6 -6
- metadata +2 -2
data/inflation.gemspec
CHANGED
@@ -10,7 +10,7 @@ Gem::Specification.new do |gem|
|
|
10
10
|
gem.email = ["dmastylo@codequarry.net"]
|
11
11
|
gem.description = %q{ Find out how much money was worth any year from 1800 to now. }
|
12
12
|
gem.summary = %q{ Find out how much your dollar used to be worth. }
|
13
|
-
gem.homepage = ""
|
13
|
+
gem.homepage = "https://github.com/dmastylo/Inflation"
|
14
14
|
|
15
15
|
gem.add_development_dependency "rspec"
|
16
16
|
|
data/lib/inflation/inflation.rb
CHANGED
data/lib/inflation/version.rb
CHANGED
data/spec/inflation_spec.rb
CHANGED
@@ -30,22 +30,22 @@ describe "Inflation" do
|
|
30
30
|
|
31
31
|
context "#to" do
|
32
32
|
it "should calculate the inflation rate of the number" do
|
33
|
-
1.from_1850.to_2012.should == 27.50
|
34
|
-
100.from_2012.to_2000.should == 75.27
|
35
|
-
75.27.from_2000.to_2012.should == 100
|
33
|
+
1.from_1850.to_2012.round(2).should == 27.50
|
34
|
+
100.from_2012.to_2000.round(2).should == 75.27
|
35
|
+
75.27.from_2000.to_2012.round(2).should == 100
|
36
36
|
end
|
37
37
|
end
|
38
38
|
|
39
39
|
context "#from_now" do
|
40
40
|
it "should calculate the inflation rate of the number from current year values" do
|
41
|
-
100.from_now.to_2000.should == 75.27
|
41
|
+
100.from_now.to_2000.round(2).should == 75.27
|
42
42
|
end
|
43
43
|
end
|
44
44
|
|
45
45
|
context "#to_now" do
|
46
46
|
it "should calculate the inflation rate of the number to current year values" do
|
47
|
-
1.from_1850.to_now.should == 27.50
|
48
|
-
75.27.from_2000.to_now.should == 100
|
47
|
+
1.from_1850.to_now.round(2).should == 27.50
|
48
|
+
75.27.from_2000.to_now.round(2).should == 100
|
49
49
|
end
|
50
50
|
end
|
51
51
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: inflation
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.3
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -45,7 +45,7 @@ files:
|
|
45
45
|
- lib/inflation/inflation.rb
|
46
46
|
- lib/inflation/version.rb
|
47
47
|
- spec/inflation_spec.rb
|
48
|
-
homepage:
|
48
|
+
homepage: https://github.com/dmastylo/Inflation
|
49
49
|
licenses: []
|
50
50
|
post_install_message:
|
51
51
|
rdoc_options: []
|