gamification 1.0.1 → 1.0.2

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.
@@ -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
- before do
11
- create :gamification_reward, rewardable: user, goal: goal
12
- create :gamification_reward, rewardable: user, goal: goal_without_medal
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
- it 'returns medals' do
16
- expect(user.medals).to eq [medal]
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.1
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-03 00:00:00.000000000 Z
11
+ date: 2015-09-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails