Permalink
Browse files

loosen up the connecion tests slightly

  • Loading branch information...
1 parent b366835 commit c3f877451633b970415667c8ceb49867ca7a5b58 @stve stve committed Jul 15, 2012
Showing with 3 additions and 5 deletions.
  1. +3 −5 spec/em-twitter/connection_spec.rb
View
8 spec/em-twitter/connection_spec.rb
@@ -55,7 +55,7 @@
EM::Timer.new(10) { EM.stop }
end
- count.should == 100
+ count.should >= 100
end
end
@@ -76,21 +76,19 @@
after { Mockingbird.teardown }
it 'emits each complete response chunk' do
- count = 0
responses = []
EM.run do
client = EM::Twitter::Client.connect(default_options)
client.each do |message|
- count += 1
responses << message
- EM.stop if count >= 100
+ EM.stop if responses.size >= 100
end
EM::Timer.new(10) { EM.stop }
end
- count.should == 100
+ responses.size.should >= 100
responses.last.should eq('{"foo":"bar"}')
end
end

0 comments on commit c3f8774

Please sign in to comment.