Sha256: d4e7c281ab6618a66ca1c99b9899df595203602d3c5891226734db8cd1a74ced

Contents?: true

Size: 657 Bytes

Versions: 4

Compression:

Stored size: 657 Bytes

Contents

require 'spec_helper'

describe 'gamification/rewards/_presentation.html.erb' do
  let!(:goal)   { create :goal, points: 100 }
  let!(:reward) { create :reward, goal: goal }
  let!(:medal)  { create :medal, goal: goal }

  before do
    render partial: 'gamification/rewards/presentation', locals: { rewards: [reward] }
  end

  it 'should contain the name of the medal' do
    expect(rendered).to include medal.name
  end

  it 'should contain the description of the medal' do
    expect(rendered).to include medal.description
  end

  it 'should contain the how many points the goal is worth' do
    expect(rendered).to include goal.points.to_s
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
gamification-1.0.3 spec/views/gamification/rewards/_presentation.html.erb_spec.rb
gamification-1.0.2 spec/views/gamification/rewards/_presentation.html.erb_spec.rb
gamification-1.0.1 spec/views/gamification/rewards/_presentation.html.erb_spec.rb
gamification-1.0.0 spec/views/gamification/rewards/_presentation.html.erb_spec.rb