Sha256: 3061e5d29c117ce120fe933a0cbd1fb16dc5cf71aab52eb8f768132f0d7fc2fe
Contents?: true
Size: 996 Bytes
Versions: 2
Compression:
Stored size: 996 Bytes
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', '13'], ['rake spec', '13'], ['rake generative', '30000'], ['bin/generative', '30000'] ].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
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
generative-0.2.0 | Rakefile |
generative-0.2.0.pre3 | Rakefile |