Rakefile in clintegracon-0.4.1 vs Rakefile in clintegracon-0.5.0
- old
+ new
@@ -20,30 +20,33 @@
puts 'Run bacon spec …'
sh 'diff spec/bacon/execution_output.txt tmp/bacon_execution_output.txt' do |ok, res|
if ok
puts '✓ Spec for bacon passed.'.green
else
- puts '✗ Spec for bacon failed.'.red
+ fail '✗ Spec for bacon failed.'.red
end
end
end
desc 'Run the tasks for bacon integration spec verbose and without any outer expectations'
task :bacon_integration_runner do
sh [
'bundle exec bacon spec/bacon/spec_helper.rb',
- 'sed -e "s|$(echo $GEM_HOME)|\$GEM_HOME|g"',
- 'sed -e "s|$(dirname ~/.)|\$HOME|g"'
+ 'sed -e "s|$(dirname ~/.)|\$HOME|g"',
+ # Keep exception formatting of different ruby versions clean and compatible
+ 'sed -E "s|^([[:space:]])./|\1|g"',
+ 'sed -e "s|:in \`.*\'$||g"',
+ 'awk "!/\/bin\/ruby_executable_hooks/"'
].join " | "
end
desc 'Run all integration specs'
task :integration => [
'spec:bacon_integration'
]
desc 'Run all unit specs'
- task :unit do
+ task :unit => [:prepare] do
sh "bundle exec bacon #{specs('unit/**/*')}"
end
def specs(dir)
FileList["spec/#{dir}_spec.rb"].shuffle.join(' ')