Generated 2010-09-21T21:32:57-04:00

## All Files (100.0%)

1 files in total. 10 relevant lines. 10 lines covered and 0 lines missed

File | % covered | Lines | Relevant Lines | Lines covered | Lines missed
--- | --- | --- | --- | --- | ---
./tennis_scorer.rb | 100.0 % | 21 | 10 | 10 | 0

### ./tennis_scorer.rb #### 100.0 % covered
# |  | Hits
--- | --- | ---
    1
    class TennisScorer
| 1
    2
    3
      OPPOSITE_SIDE_OF_NET = {
| 1
    4
        :server => :receiver,
    5
        :receiver => :server
    6
      }
    7
    8
      def initialize
| 1
    9
        @score = { :server => 0, :receiver => 0 }
| 4
    10
      end
    11
    12
      def score
| 1
    13
        "#{@score[:server]*15}-#{@score[:receiver]*15}"
| 4
    14
      end
    15
    16
      def give_point_to(player)
| 1
    17
        other = OPPOSITE_SIDE_OF_NET[player]
| 4
    18
        fail "Unknown player #{player}" unless other
| 4
    19
        @score[player] += 1
| 4
    20
      end
    21
    end