Sha256: 82d1298f9b78849eb5d36c81050ccea9c4e8587ce633b82cc08b5b8b818ab2b4
Contents?: true
Size: 744 Bytes
Versions: 8
Compression:
Stored size: 744 Bytes
Contents
require_relative "spec_helper" describe TriviaCrack::User do let(:user_id) { 111 } let(:user) { TriviaCrack::User.new id: user_id, lives: lives, unlimited_lives: unlimited_lives } describe "#start_new_game?" do subject { user.start_new_game? } context 'when the user has one or more live' do let(:lives) { 1 } let(:unlimited_lives) { false } it { is_expected.to be true } end context 'when the user has unlimited lives' do let(:lives) { 0 } let(:unlimited_lives) { true } it { is_expected.to be true } end context 'when the user has no more lives' do let(:lives) { 0 } let(:unlimited_lives) { false } it { is_expected.to be false } end end end
Version data entries
8 entries across 8 versions & 1 rubygems