zillion 0.0.4 → 0.0.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/zillion/plan.rb +5 -1
- data/spec/mapper_spec.rb +2 -1
- data/spec/plans_spec.rb +24 -0
- data/zillion.gemspec +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 718bbd8b99f88fdd71000d54e77ebc25e62cb6a4
|
4
|
+
data.tar.gz: 828b54653dd2ae96f3485b9a31f965c15ea85ba5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8fcd9c45bcd32b1b9e006b6651a2ee1485568f470160a565c025a8a11bd91e7276b29f0121ca3e565027c10b0600b725b9a761810b018514dc66890e7f5cf1d8
|
7
|
+
data.tar.gz: f0b79d326243e419d81dadeb2d25c987d2d1799c46ec67e31911a071a66a7048010339d8933bfbe6277b2cc2ba5e2246402990024c5a2d13e59b9ebd1b29bace
|
data/lib/zillion/plan.rb
CHANGED
data/spec/mapper_spec.rb
CHANGED
@@ -37,7 +37,8 @@ describe 'PlanFinder' do
|
|
37
37
|
|
38
38
|
it 'returns all plans, including unavailable ones' do
|
39
39
|
finder = PlanFinder.init(mapper).new({ products: 120 })
|
40
|
-
expect(finder.sorted_plans.map(&:
|
40
|
+
expect(finder.sorted_plans.map(&:key)).to eql([:small, :medium, :large])
|
41
|
+
expect(finder.sorted_plans.map(&:name)).to eql(['small', 'medium', 'large'])
|
41
42
|
end
|
42
43
|
|
43
44
|
end
|
data/spec/plans_spec.rb
CHANGED
@@ -7,6 +7,30 @@ describe 'FreePlan' do
|
|
7
7
|
|
8
8
|
let(:plan) { FreePlan.new }
|
9
9
|
|
10
|
+
describe "#name" do
|
11
|
+
|
12
|
+
it 'returns the classes name if none set' do
|
13
|
+
a = FreePlan.new(name: 'foo')
|
14
|
+
expect(a.name).to eql('foo')
|
15
|
+
|
16
|
+
b = FreePlan.new
|
17
|
+
expect(b.name).to eql('FreePlan')
|
18
|
+
end
|
19
|
+
|
20
|
+
end
|
21
|
+
|
22
|
+
describe "#key" do
|
23
|
+
|
24
|
+
it 'returns the name if unset' do
|
25
|
+
a = FreePlan.new(name: 'foo')
|
26
|
+
expect(a.key).to eql(:foo)
|
27
|
+
|
28
|
+
b = FreePlan.new(key: 'something_else')
|
29
|
+
expect(b.key).to eql(:something_else)
|
30
|
+
end
|
31
|
+
|
32
|
+
end
|
33
|
+
|
10
34
|
describe '#monthly_fee' do
|
11
35
|
|
12
36
|
it 'returns 0 as monthly_fee' do
|
data/zillion.gemspec
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: zillion
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Tomás Pollak
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-04-
|
11
|
+
date: 2017-04-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|