icecream 0.0.12 → 0.0.13
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGES +4 -0
- data/lib/icecream/version.rb +1 -1
- data/spec/flavors/acai.flavor +6 -0
- data/spec/flavors/apple.flavor +1 -0
- data/spec/flavors/chocolate.flavor +1 -0
- data/spec/flavors/cream.flavor +1 -0
- data/spec/icecream_spec.rb +14 -1
- metadata +5 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7c41a810b949595862274851fd9227d389701e47
|
4
|
+
data.tar.gz: 850649e15642ca4b892f43f4dd4e9593716b539d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3a32901512cd2bc2d1046168285b3673a016b6abcb78edd609ae2362faaa206c64b905fae7011013048704df585c21b172c6738da3a564c010b202110d8311ba
|
7
|
+
data.tar.gz: 42e1b80b43b4641874d30177ee94925587e390e4cc3f2470ff4f9cf9f6cbefa2d0246e8414aeca7a4c6747473f77490c580a704e4b469d7d26d06c41f2383856
|
data/CHANGES
ADDED
data/lib/icecream/version.rb
CHANGED
data/spec/flavors/apple.flavor
CHANGED
data/spec/flavors/cream.flavor
CHANGED
data/spec/icecream_spec.rb
CHANGED
@@ -8,7 +8,7 @@ describe "Icecream" do
|
|
8
8
|
end
|
9
9
|
|
10
10
|
it "returns all flavors" do
|
11
|
-
@fridge.all.should
|
11
|
+
@fridge.all.should match_array [:@apple, :@chocolate, :@cream, :@acai]
|
12
12
|
end
|
13
13
|
|
14
14
|
it "has objects for each file in the factory filder" do
|
@@ -19,6 +19,7 @@ describe "Icecream" do
|
|
19
19
|
chocolate.color.should eq :brown
|
20
20
|
chocolate.price.should eq 15.5
|
21
21
|
chocolate.calories.should eq 150
|
22
|
+
chocolate.extra_description.should eq "Super good"
|
22
23
|
chocolate.resumo.should eq ["chocolate", 150, :brown, 15.5]
|
23
24
|
|
24
25
|
cream = @fridge.flavor :cream
|
@@ -26,6 +27,7 @@ describe "Icecream" do
|
|
26
27
|
cream.name.should eq "cream"
|
27
28
|
cream.color.should eq :yellow
|
28
29
|
cream.price.should eq 17.5
|
30
|
+
cream.extra_description.should eq "Cremousssss"
|
29
31
|
cream.calories.should eq 200
|
30
32
|
|
31
33
|
apple = @fridge.flavor :apple
|
@@ -33,8 +35,18 @@ describe "Icecream" do
|
|
33
35
|
apple.name.should eq "apple"
|
34
36
|
apple.color.should eq :red
|
35
37
|
apple.price.should eq 1.5
|
38
|
+
apple.extra_description.should eq "health!"
|
36
39
|
apple.calories.should eq 1500
|
40
|
+
|
41
|
+
apple = @fridge.flavor :acai
|
42
|
+
apple.class.should be Acai
|
43
|
+
apple.name.should eq "Açaí-the best flavor-ever"
|
44
|
+
apple.color.should eq ""
|
45
|
+
apple.price.should eq 20.5
|
46
|
+
apple.extra_description.should eq "Brazilian!"
|
47
|
+
apple.calories.should eq 10
|
37
48
|
end
|
49
|
+
|
38
50
|
it "creates a new flavor from an array" do
|
39
51
|
new_flavor = IceCream::IceCream.flavor :Orange, "[name = 'orange', color = :orange, price = 35.5, calories = 3]"
|
40
52
|
new_flavor.class.should be Orange
|
@@ -43,6 +55,7 @@ describe "Icecream" do
|
|
43
55
|
new_flavor.price.should eq 35.5
|
44
56
|
new_flavor.calories.should eq 3
|
45
57
|
end
|
58
|
+
|
46
59
|
it "merges the objects" do
|
47
60
|
cream = @fridge.flavor :cream
|
48
61
|
complementary_flavor = IceCream::IceCream.flavor :Orange, "[name = 'orange', price = 35.5]"
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: icecream
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.13
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Camilo Ribeiro
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-02-
|
11
|
+
date: 2015-02-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: pry
|
@@ -78,6 +78,7 @@ files:
|
|
78
78
|
- .rspec
|
79
79
|
- .ruby-version
|
80
80
|
- .travis.yml
|
81
|
+
- CHANGES
|
81
82
|
- Gemfile
|
82
83
|
- README.md
|
83
84
|
- Rakefile
|
@@ -86,6 +87,7 @@ files:
|
|
86
87
|
- lib/icecream/icecream.rb
|
87
88
|
- lib/icecream/parser.rb
|
88
89
|
- lib/icecream/version.rb
|
90
|
+
- spec/flavors/acai.flavor
|
89
91
|
- spec/flavors/apple.flavor
|
90
92
|
- spec/flavors/chocolate.flavor
|
91
93
|
- spec/flavors/cream.flavor
|
@@ -117,6 +119,7 @@ signing_key:
|
|
117
119
|
specification_version: 4
|
118
120
|
summary: Simple Factory to the ones who just wanna a factory
|
119
121
|
test_files:
|
122
|
+
- spec/flavors/acai.flavor
|
120
123
|
- spec/flavors/apple.flavor
|
121
124
|
- spec/flavors/chocolate.flavor
|
122
125
|
- spec/flavors/cream.flavor
|