gamification 1.0.2 → 1.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/gamification/concerns/rewardable.rb +1 -1
- data/lib/gamification/version.rb +1 -1
- data/spec/dummy/log/test.log +2559 -0
- data/spec/lib/gamification/concerns/rewardable_spec.rb +20 -6
- metadata +2 -2
@@ -7,14 +7,28 @@ describe Gamification::Concerns::Rewardable do
|
|
7
7
|
let(:goal) { create :gamification_goal, medal: medal }
|
8
8
|
let(:goal_without_medal) { create :gamification_goal }
|
9
9
|
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
10
|
+
context "when there is goal without medal" do
|
11
|
+
describe "when medals earned" do
|
12
|
+
before do
|
13
|
+
create :gamification_reward, rewardable: user, goal: goal
|
14
|
+
create :gamification_reward, rewardable: user, goal: goal_without_medal
|
15
|
+
end
|
16
|
+
|
17
|
+
it 'returns medals' do
|
18
|
+
expect(user.medals).to eq [medal]
|
19
|
+
end
|
14
20
|
end
|
21
|
+
end
|
22
|
+
|
23
|
+
context "when goals have medal" do
|
24
|
+
describe "when medals earned" do
|
25
|
+
before do
|
26
|
+
create :gamification_reward, rewardable: user, goal: goal
|
27
|
+
end
|
15
28
|
|
16
|
-
|
17
|
-
|
29
|
+
it 'returns medals' do
|
30
|
+
expect(user.medals).to eq [medal]
|
31
|
+
end
|
18
32
|
end
|
19
33
|
end
|
20
34
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: gamification
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Johannes Gorset
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2016-02-25 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|