Sha256: f6cf52ab7ca5191951d410508dcbdb92306b3577acff942f1f40cdb9fbe20cd8

Contents?: true

Size: 444 Bytes

Versions: 4

Compression:

Stored size: 444 Bytes

Contents

require 'spec_helper'

module Gamification
  describe RewardsHelper do
    describe '#present_rewards' do
      let!(:user)   { create :user }
      let!(:reward) { create :reward, seen_at: nil, rewardable: user }

      it 'renders a partial' do
        expect(helper).to receive(:render) do |options|
          expect(options[:locals]).to eq rewards: [reward]
        end

        helper.present_rewards for: user
      end
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
gamification-1.0.3 spec/helpers/gamification/rewards_helper_spec.rb
gamification-1.0.2 spec/helpers/gamification/rewards_helper_spec.rb
gamification-1.0.1 spec/helpers/gamification/rewards_helper_spec.rb
gamification-1.0.0 spec/helpers/gamification/rewards_helper_spec.rb