Skip to content

Commit

Permalink
Unnest some inner spec contexts that should not be nested.
Browse files Browse the repository at this point in the history
  • Loading branch information
Pistos committed Feb 13, 2013
1 parent 89d777d commit b20cb58
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions spec/dispatcher_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -29,17 +29,17 @@
@s.response['message'].should =~ /introduce/i
end
end
end

context 'when the requester has INTRODUCEd but not AUTHENTICATEd itself' do
include_context 'with an INTRODUCEd requester'
context 'when the requester has INTRODUCEd but not AUTHENTICATEd itself' do
include_context 'with an INTRODUCEd requester'

it 'returns ERROR' do
commands = Libertree::Server::Responder::Dispatcher::VALID_COMMANDS - ['INTRODUCE', 'AUTHENTICATE',]
commands.each do |command|
@s.process %|#{command} { "anything": "anything" }|
@s.should have_responded_with_code('ERROR')
@s.response['message'].should =~ /authenticate/i
end
it 'returns ERROR' do
commands = Libertree::Server::Responder::Dispatcher::VALID_COMMANDS - ['INTRODUCE', 'AUTHENTICATE',]
commands.each do |command|
@s.process %|#{command} { "anything": "anything" }|
@s.should have_responded_with_code('ERROR')
@s.response['message'].should =~ /authenticate/i
end
end
end
Expand Down

0 comments on commit b20cb58

Please sign in to comment.