Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 71 lines (58 sloc) 1.795 kb
32cc890 David Chelimsky Development env now works correctly with bundler.
dchelimsky authored
1 require 'bundler'
2 Bundler.setup
15060b8 Myron Marston Remove dependency on jeweler.
myronmarston authored
3 Bundler::GemHelper.install_tasks
32cc890 David Chelimsky Development env now works correctly with bundler.
dchelimsky authored
4
dcfcac8 Chad Humphries Initial commit to rspec-expectations.
spicycode authored
5 require 'rake'
298e9c3 David Chelimsky Run cucumber in context of bundle when shelling out.
dchelimsky authored
6 require 'rake/rdoctask'
7 require 'rspec/core/rake_task'
d1653d7 Hans de Graaff Explicitly require rspec version to fix broken rdoc task.
graaff authored
8 require 'rspec/expectations/version'
298e9c3 David Chelimsky Run cucumber in context of bundle when shelling out.
dchelimsky authored
9 require 'cucumber/rake/task'
dcfcac8 Chad Humphries Initial commit to rspec-expectations.
spicycode authored
10
298e9c3 David Chelimsky Run cucumber in context of bundle when shelling out.
dchelimsky authored
11 class Cucumber::Rake::Task::ForkedCucumberRunner
12 # When cucumber shells out, we still need it to run in the context of our
13 # bundle.
14 def run
15 sh "bundle exec #{RUBY} " + args.join(" ")
a8f577a David Chelimsky load paths 'n stuff
dchelimsky authored
16 end
298e9c3 David Chelimsky Run cucumber in context of bundle when shelling out.
dchelimsky authored
17 end
18
8457ee8 Myron Marston Setup rcov.
myronmarston authored
19 task :cleanup_rcov_files do
20 rm_rf 'coverage.data'
21 end
22
6dffc93 David Chelimsky update rake tasks
dchelimsky authored
23 desc "Run all examples"
24 RSpec::Core::RakeTask.new(:spec) do |t|
25 t.rspec_opts = %w[--color]
26 end
b44b3ad David Chelimsky only run rcov when asked (default tasks don't)
dchelimsky authored
27
28 Cucumber::Rake::Task.new(:cucumber)
29
30 namespace :spec do
31 desc "Run all examples using rcov"
32 RSpec::Core::RakeTask.new :rcov => :cleanup_rcov_files do |t|
33 t.rcov = true
34 t.rcov_opts = %[-Ilib -Ispec --exclude "gems/*,features"]
35 t.rcov_opts << %[--text-report --sort coverage --no-html --aggregate coverage.data]
36 end
37 end
38
39 namespace :cucumber do
40 desc "Run cucumber features using rcov"
41 Cucumber::Rake::Task.new :rcov => :cleanup_rcov_files do |t|
42 t.cucumber_opts = %w{--format progress}
43 t.rcov = true
44 t.rcov_opts = %[-Ilib -Ispec --exclude "gems/*,features"]
45 t.rcov_opts << %[--text-report --sort coverage --aggregate coverage.data]
46 end
3e2e9bd David Chelimsky add features (moved from rspec-core)
dchelimsky authored
47 end
48
15060b8 Myron Marston Remove dependency on jeweler.
myronmarston authored
49 task :default => [:spec, :cucumber]
dcfcac8 Chad Humphries Initial commit to rspec-expectations.
spicycode authored
50
51 Rake::RDocTask.new do |rdoc|
52 rdoc.rdoc_dir = 'rdoc'
15060b8 Myron Marston Remove dependency on jeweler.
myronmarston authored
53 rdoc.title = "rspec-expectations #{RSpec::Expectations::Version::STRING}"
dcfcac8 Chad Humphries Initial commit to rspec-expectations.
spicycode authored
54 rdoc.rdoc_files.include('README*')
55 rdoc.rdoc_files.include('lib/**/*.rb')
56 end
57
2b10fc0 David Chelimsky dev-support: update relish task
dchelimsky authored
58 desc "Push docs/cukes to relishapp using the relish-client-gem"
22d41fb David Chelimsky add a little relish
dchelimsky authored
59 task :relish, :version do |t, args|
60 raise "rake relish[VERSION]" unless args[:version]
2b10fc0 David Chelimsky dev-support: update relish task
dchelimsky authored
61 sh "relish push rspec/rspec-expectations:#{args[:version]}"
22d41fb David Chelimsky add a little relish
dchelimsky authored
62 end
63
d40404d David Chelimsky add clobber task
dchelimsky authored
64 task :clobber do
108291c David Chelimsky don't diff single line strings
dchelimsky authored
65 rm_rf 'doc'
d40404d David Chelimsky add clobber task
dchelimsky authored
66 rm_rf 'pkg'
67 rm_rf 'tmp'
68 rm_rf 'coverage'
69 end
70
Something went wrong with that request. Please try again.