Skip to content

Commit

Permalink
Better test coverage for relational delegators
Browse files Browse the repository at this point in the history
  • Loading branch information
cadwallion committed Aug 18, 2012
1 parent ac48b18 commit 3ef0434
Showing 1 changed file with 4 additions and 8 deletions.
12 changes: 4 additions & 8 deletions spec/bracket_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -190,14 +190,10 @@
describe 'positional relation hooks' do
let(:bracket) { BracketTree::Bracket::DoubleElimination.by_size 4 }

it 'delegates the query methods to a relation' do
relation = bracket.winners
relation.should be_a BracketTree::PositionalRelation
end

it 'delegates the accessor methods to a relation' do
nodes = bracket.winners.round(1).all
nodes.should have(4).nodes
[:winners, :losers, :round, :all, :first, :last, :seat].each do |m|
it "should respond to #{m}" do
bracket.should respond_to m
end
end
end
end

0 comments on commit 3ef0434

Please sign in to comment.