Sha256: df7ce69b5a12499e270e29e36933ecb71c8984e1462efc523aade832b0d91d8a
Contents?: true
Size: 1.04 KB
Versions: 4
Compression:
Stored size: 1.04 KB
Contents
require 'bundler/gem_tasks' require 'rspec/core/rake_task' require 'generative/rake_task' task default: [:spec, :generative, :acceptance] task ci: [:spec, :generative] RSpec::Core::RakeTask.new Generative::RakeTask.new desc "Verify all spec commands behave properly" task :acceptance do ENV.delete('GENERATIVE_COUNT') [ ['rspec', '22'], # can we do this some other way ['rake spec', '22'], # sucks to bump as we add tests... ['rake generative', '40000'], ['bin/generative', '40000'] ].each do |command, expected_example_count| puts "Checking output of `#{command}`" output = %x{#{command}} pattern = /(\d+) examples, (\d+) failures/ _, example_count, failure_count = output.match(pattern).to_a unless failure_count == '0' fail "`#{command}` had #{failure_count} failures" end unless example_count == expected_example_count fail "`#{command}` had an incorrect example count, " \ "expected #{expected_example_count}, " \ "but got #{example_count}" end end puts "Yay!" end
Version data entries
4 entries across 4 versions & 1 rubygems
Version | Path |
---|---|
generative-0.2.5 | Rakefile |
generative-0.2.4 | Rakefile |
generative-0.2.3 | Rakefile |
generative-0.2.2 | Rakefile |