diff --git a/_plugins/youtube.rb b/_plugins/youtube.rb index 93a7f861e38..4605b57c811 100644 --- a/_plugins/youtube.rb +++ b/_plugins/youtube.rb @@ -34,6 +34,7 @@ def render(context) uri = URI.parse("https://www.googleapis.com/youtube/v3/videos?id=#{@id}&part=snippet,statistics&key=#{key}") json = JSON.parse(Net::HTTP.get(uri)) raise json['error']['message'] if json['error'] + raise "YouTube video #{@id} not found" if json['items'].empty? item = json['items'][0] snippet = item['snippet'] puts "YouTube video #{@id} found: #{snippet['title']}" diff --git a/_posts/2017/mar/2017-03-24-tdd-that-works.md b/_posts/2017/mar/2017-03-24-tdd-that-works.md index 4fed542069c..3e2c6c12b88 100644 --- a/_posts/2017/mar/2017-03-24-tdd-that-works.md +++ b/_posts/2017/mar/2017-03-24-tdd-that-works.md @@ -61,8 +61,6 @@ not calculator examples. It's also very _inefficient_, because tests by definiti are much more rigid than the code they validate—creating them first will cause many re-do cycles until the design is stabilized. -{% youtube R_2AvKDHAWI %} - I've personally [written](https://github.com/yegor256) almost 300,000 lines of code in Java, Ruby, PHP, and JavaScript over the last four years, and I have never done TDD by the book: "write a test, make it run, make it right." Ever.