Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100644 65 lines (55 sloc) 1.673 kB
32cc890 @dchelimsky Development env now works correctly with bundler.
dchelimsky authored
1 require 'bundler'
2 Bundler.setup
15060b8 @myronmarston Remove dependency on jeweler.
myronmarston authored
3 Bundler::GemHelper.install_tasks
32cc890 @dchelimsky Development env now works correctly with bundler.
dchelimsky authored
4
dcfcac8 @spicycode Initial commit to rspec-expectations.
spicycode authored
5 require 'rake'
298e9c3 @dchelimsky Run cucumber in context of bundle when shelling out.
dchelimsky authored
6 require 'rspec/core/rake_task'
d1653d7 @graaff Explicitly require rspec version to fix broken rdoc task.
graaff authored
7 require 'rspec/expectations/version'
dcfcac8 @spicycode Initial commit to rspec-expectations.
spicycode authored
8
27c1205 @dchelimsky remove broken cuke monkey patch
dchelimsky authored
9 require 'cucumber/rake/task'
10 Cucumber::Rake::Task.new(:cucumber)
11
8457ee8 @myronmarston Setup rcov.
myronmarston authored
12 task :cleanup_rcov_files do
13 rm_rf 'coverage.data'
14 end
15
6dffc93 @dchelimsky update rake tasks
dchelimsky authored
16 desc "Run all examples"
17 RSpec::Core::RakeTask.new(:spec) do |t|
18 t.rspec_opts = %w[--color]
f852ee1 @dchelimsky add -w flag to rake spec
dchelimsky authored
19 t.ruby_opts = %w[-w]
6dffc93 @dchelimsky update rake tasks
dchelimsky authored
20 end
b44b3ad @dchelimsky only run rcov when asked (default tasks don't)
dchelimsky authored
21
5ee3840 @dchelimsky dev: exclude rcov for ruby 1.9
dchelimsky authored
22 if RUBY_VERSION.to_f == 1.8
23 namespace :rcov do
24 desc "Run all examples using rcov"
25 RSpec::Core::RakeTask.new :spec => :cleanup_rcov_files do |t|
26 t.rcov = true
27 t.rcov_opts = %[-Ilib -Ispec --exclude "gems/*,features"]
28 t.rcov_opts << %[--text-report --sort coverage --no-html --aggregate coverage.data]
29 end
30 desc "Run cucumber features using rcov"
31 Cucumber::Rake::Task.new :cucumber => :cleanup_rcov_files do |t|
32 t.cucumber_opts = %w{--format progress}
33 t.rcov = true
34 t.rcov_opts = %[-Ilib -Ispec --exclude "gems/*,features"]
35 t.rcov_opts << %[--text-report --sort coverage --aggregate coverage.data]
36 end
b44b3ad @dchelimsky only run rcov when asked (default tasks don't)
dchelimsky authored
37 end
38 end
39
2b10fc0 @dchelimsky dev-support: update relish task
dchelimsky authored
40 desc "Push docs/cukes to relishapp using the relish-client-gem"
22d41fb @dchelimsky add a little relish
dchelimsky authored
41 task :relish, :version do |t, args|
42 raise "rake relish[VERSION]" unless args[:version]
f57a594 @dchelimsky move changelog to project root
dchelimsky authored
43 sh "cp Changelog.md features/"
2b10fc0 @dchelimsky dev-support: update relish task
dchelimsky authored
44 sh "relish push rspec/rspec-expectations:#{args[:version]}"
f57a594 @dchelimsky move changelog to project root
dchelimsky authored
45 sh "rm features/Changelog.md"
22d41fb @dchelimsky add a little relish
dchelimsky authored
46 end
47
1e001c2 @dchelimsky dev: rake clobber:rbc task
dchelimsky authored
48 namespace :clobber do
49 desc "delete generated .rbc files"
50 task :rbc do
51 sh %q{find . -name "*.rbc" | xargs rm}
52 end
53 end
54
55 desc "delete generated files"
56 task :clobber => ["clobber:rbc"] do
108291c @dchelimsky don't diff single line strings
dchelimsky authored
57 rm_rf 'doc'
9cd937b @dchelimsky dev: clobber docs
dchelimsky authored
58 rm_rf '.yardoc'
d40404d @dchelimsky add clobber task
dchelimsky authored
59 rm_rf 'pkg'
60 rm_rf 'tmp'
61 rm_rf 'coverage'
62 end
5ee3840 @dchelimsky dev: exclude rcov for ruby 1.9
dchelimsky authored
63
64 task :default => [:spec, :cucumber]
Something went wrong with that request. Please try again.