Permalink
Browse files

inspect the build.sh on failure

  • Loading branch information...
1 parent 0ec5791 commit d9093b5b73f5a134d4cabf18376bc7f072e3d7e7 @svenfuchs svenfuchs committed Dec 27, 2012
Showing with 16 additions and 1 deletion.
  1. +1 −1 .travis.yml
  2. +14 −0 spec/spec_helper.rb
  3. +1 −0 spec/support/matchers.rb
View
@@ -4,4 +4,4 @@ rvm:
- jruby-18mode
- jruby-19mode
- jruby-head
-script: "bundle exec rspec spec"
+script: "bundle exec rspec spec --fail-fast"
View
@@ -44,4 +44,18 @@ def gemfile(name)
FileUtils.rm_rf 'tmp'
FileUtils.mkdir 'tmp'
end
+
+ c.after :each do
+ puts subject if example.failed?
+ end
+end
+
+class RSpec::Core::Example
+ def passed?
+ @exception.nil?
+ end
+
+ def failed?
+ !passed?
+ end
end
View
@@ -31,6 +31,7 @@ def asserts?(lines, cmd)
end
def log_for(script)
+ File.open('tmp/build.sh', 'w+') { |f| f.write(script) } unless File.exists?('tmp/build.sh')
system script unless File.exists?('tmp/test.log')
File.read('tmp/test.log')
end

0 comments on commit d9093b5

Please sign in to comment.