Sha256: 69b0b72616ffd69441ebe1b5585fbc252b30f8bda4e11631dfe2f0d6b1a912a4
Contents?: true
Size: 1.57 KB
Versions: 6
Compression:
Stored size: 1.57 KB
Contents
#encoding: utf-8 begin require 'bundler/gem_tasks' require 'colored' namespace :spec do task :prepare do verbose false puts 'Prepare …' sh 'mkdir -p tmp' rm_rf 'tmp/*' end desc 'Run the bacon integration spec' task :bacon_integration => [:prepare] do verbose false sh 'rake spec:bacon_integration_runner > tmp/bacon_execution_output.txt' do; end 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 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|$(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 => [:prepare] do sh "bundle exec bacon #{specs('unit/**/*')}" end def specs(dir) FileList["spec/#{dir}_spec.rb"].shuffle.join(' ') end desc 'Run all specs' task :all => [:unit, :integration] end desc 'Run all specs' task :spec => 'spec:all' end
Version data entries
6 entries across 6 versions & 1 rubygems
Version | Path |
---|---|
clintegracon-0.6.1 | Rakefile |
clintegracon-0.6.0 | Rakefile |
clintegracon-0.5.3 | Rakefile |
clintegracon-0.5.2 | Rakefile |
clintegracon-0.5.1 | Rakefile |
clintegracon-0.5.0 | Rakefile |