Permalink
Browse files

Better test coverage for relational delegators

  • Loading branch information...
1 parent ac48b18 commit 3ef04349619279285d82af39c11d0f47a26686b8 @cadwallion cadwallion committed Aug 18, 2012
Showing with 4 additions and 8 deletions.
  1. +4 −8 spec/bracket_spec.rb
View
@@ -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.