Permalink
Browse files

ST: Updated :examples rake task to tell me when file did not run

  • Loading branch information...
1 parent 117832d commit 30029375a4054619b84a931c87a51d5c052708d8 @rudionrails committed Apr 4, 2012
Showing with 11 additions and 2 deletions.
  1. +11 −2 Rakefile
View
@@ -4,8 +4,17 @@ require 'bundler'
Bundler::GemHelper.install_tasks
task :examples do
- puts "**** Running Examples"
- Dir[ File.dirname(__FILE__) + '/examples/*.rb' ].each { |file| require file }
+ Dir[ './examples/*.rb' ].each do |file|
+ begin
+ puts "**** Running #{file}"
+
+ require file
+ rescue Exception => e
+ puts "#{e.class}: #{e.message}:\n\t#{e.backtrace.join("\n\t")}"
+
+ exit 1
+ end
+ end
end
# === RSpec

0 comments on commit 3002937

Please sign in to comment.