Permalink
Browse files

more error details

  • Loading branch information...
1 parent f1962fa commit 62131556d8edba7f92b8913c0f8c8a1c1f6c6325 @jarthod jarthod committed May 15, 2012
Showing with 10 additions and 4 deletions.
  1. +9 −3 test/test_client.rb
  2. +1 −1 youtube_it.gemspec
View
12 test/test_client.rb
@@ -334,7 +334,7 @@ def test_should_dislike_to_video
def test_should_subscribe_list_and_unsubscribe_to_channel
@client.subscriptions.each {|s| @client.unsubscribe_channel(s.id) }
subscribe = nil
- wait_until { subscribe = @client.subscribe_channel("TheWoWArthas") rescue nil }
+ wait_until { subscribe = @client.subscribe_channel("TheWoWArthas") }
assert_equal subscribe[:code], 201
subs = nil
wait_until { subs = @client.subscriptions; subs.count == 1 }
@@ -522,10 +522,16 @@ def assert_valid_url (url)
end
def wait_until &block
+ err = nil
5.times do |t|
+ print '_' if t > 0
sleep t
- return true if yield
+ begin
+ return true if yield
+ rescue => e
+ err = e
+ end
end
- assert false, "wait_until condition (#{block.to_s}) not met"
+ assert false, "wait_until condition (#{block.to_s}) not met #{err}"
end
end
View
2 youtube_it.gemspec
@@ -3,7 +3,7 @@
$:.push File.expand_path("../lib", __FILE__)
# Maintain your gem's version:
-require "youtube_it/version"
+require File.dirname(__FILE__) + "/lib/youtube_it/version"
Gem::Specification.new do |s|
s.name = "youtube_it"

0 comments on commit 6213155

Please sign in to comment.