Sha256: 040e762bcfb5cd88d14d08eb66f7f19f95841eec78050d03a2d4f8ec79e8ec2b

Contents?: true

Size: 988 Bytes

Versions: 60

Compression:

Stored size: 988 Bytes

Contents

def unable_to_load
  STDERR.puts <<-EOS
To use rspec for testing you must install rspec gem:
    gem install rspec
    
EOS
  nil
end

def require_spec
  require 'spec/expectations'
rescue LoadError
  require_spec_with_rubygems
end

def require_spec_with_rubygems
  require 'rubygems'
  require 'spec/expectations'
rescue LoadError
  unable_to_load
end

if require_spec
  begin
    require 'spec/rake/spectask'
  rescue LoadError
    unable_to_load
  end

  def undefine_task(*names)
    app = Rake.application
    tasks = app.instance_variable_get('@tasks')
    names.flatten.each { |name| tasks.delete(name) }
  end
  undefine_task('spec') # Hoe 1.2.12 is broken - it defines a spec task that we can't tweak.

  desc "Run the Cucumber specs"
  Spec::Rake::SpecTask.new do |t|
    t.spec_opts = ['--options', "spec/spec.opts"]
    t.spec_files = FileList['spec/**/*_spec.rb']
    t.rcov = ENV['RCOV']
    t.rcov_opts = %w{--exclude osx\/objc,gems\/,spec\/}
    t.verbose = true
  end
end

Version data entries

60 entries across 60 versions & 7 rubygems

Version Path
aslakhellesoy-cucumber-0.3.10 gem_tasks/rspec.rake
aslakhellesoy-cucumber-0.3.11.1 gem_tasks/rspec.rake
aslakhellesoy-cucumber-0.3.11.200907091518 gem_tasks/rspec.rake
aslakhellesoy-cucumber-0.3.11.3 gem_tasks/rspec.rake
aslakhellesoy-cucumber-0.3.11.5 gem_tasks/rspec.rake
aslakhellesoy-cucumber-0.3.11.6 gem_tasks/rspec.rake
aslakhellesoy-cucumber-0.3.11 gem_tasks/rspec.rake
aslakhellesoy-cucumber-0.3.7.1 gem_tasks/rspec.rake
aslakhellesoy-cucumber-0.3.7.2 gem_tasks/rspec.rake
aslakhellesoy-cucumber-0.3.7.3 gem_tasks/rspec.rake
aslakhellesoy-cucumber-0.3.7.4 gem_tasks/rspec.rake
aslakhellesoy-cucumber-0.3.7.5 gem_tasks/rspec.rake
aslakhellesoy-cucumber-0.3.7 gem_tasks/rspec.rake
aslakhellesoy-cucumber-0.3.8 gem_tasks/rspec.rake
aslakhellesoy-cucumber-0.3.9.1 gem_tasks/rspec.rake
aslakhellesoy-cucumber-0.3.9.2 gem_tasks/rspec.rake
aslakhellesoy-cucumber-0.3.9.3 gem_tasks/rspec.rake
aslakhellesoy-cucumber-0.3.9.4 gem_tasks/rspec.rake
aslakhellesoy-cucumber-0.3.9.5 gem_tasks/rspec.rake
aslakhellesoy-cucumber-0.3.9 gem_tasks/rspec.rake