gamification 1.0.1 → 1.0.2
Sign up to get free protection for your applications and to get access to all the features.
- 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 +1433 -0
- data/spec/lib/gamification/concerns/rewardable_spec.rb +13 -5
- metadata +2 -2
@@ -7,13 +7,21 @@ 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
|
-
|
10
|
+
describe "when medals earned" do
|
11
|
+
before do
|
12
|
+
create :gamification_reward, rewardable: user, goal: goal
|
13
|
+
create :gamification_reward, rewardable: user, goal: goal_without_medal
|
14
|
+
end
|
15
|
+
|
16
|
+
it 'returns medals' do
|
17
|
+
expect(user.medals).to eq [medal]
|
18
|
+
end
|
13
19
|
end
|
14
20
|
|
15
|
-
|
16
|
-
|
21
|
+
describe "when no medals earned" do
|
22
|
+
it 'returns empty array when no medals' do
|
23
|
+
expect(user.medals).to eq []
|
24
|
+
end
|
17
25
|
end
|
18
26
|
end
|
19
27
|
end
|
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.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Johannes Gorset
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-09-
|
11
|
+
date: 2015-09-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|