Sha256: 98726ef39ccc64c662000f39c0075c934bd756141f4c08b05fdb3743e1d16d6a

Contents?: true

Size: 727 Bytes

Versions: 1

Compression:

Stored size: 727 Bytes

Contents

require 'spec_helper'

describe FootballManager::PlayersCreator do
  subject { FootballManager::PlayersCreator }

  describe 'create_players' do
    let(:player_1) { 'player 1, 5' }
    let(:player_2) { 'player 2, 7' }
    let(:player_1_name) { 'player 1' }
    let(:player_2_name) { 'player 2' }
    let(:player_1_skill) { '5' }
    let(:player_2_skill) { '7' }
    let(:player_data) { [player_1, player_2, ''] }

    it 'iterate through the player details, creating new players' do
      FootballManager::Player.should_receive(:new).once.with(player_1_name, player_1_skill)
      FootballManager::Player.should_receive(:new).once.with(player_2_name, player_2_skill)
      subject.create_players(player_data)
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
football-manager-1.0.1 spec/football-manager/players_creator_spec.rb