Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 65 lines (55 sloc) 1.673 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 'rspec/core/rake_task'
d1653d7 Hans de Graaff Explicitly require rspec version to fix broken rdoc task.
graaff authored
7 require 'rspec/expectations/version'
dcfcac8 Chad Humphries Initial commit to rspec-expectations.
spicycode authored
8
27c1205 David Chelimsky remove broken cuke monkey patch
dchelimsky authored
9 require 'cucumber/rake/task'
10 Cucumber::Rake::Task.new(:cucumber)
11
8457ee8 Myron Marston Setup rcov.
myronmarston authored
12 task :cleanup_rcov_files do
13 rm_rf 'coverage.data'
14 end
15
6dffc93 David Chelimsky 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 David Chelimsky add -w flag to rake spec
dchelimsky authored
19 t.ruby_opts = %w[-w]
6dffc93 David Chelimsky update rake tasks
dchelimsky authored
20 end
b44b3ad David Chelimsky only run rcov when asked (default tasks don't)
dchelimsky authored
21
5ee3840 David Chelimsky 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 David Chelimsky only run rcov when asked (default tasks don't)
dchelimsky authored
37 end
38 end
39
2b10fc0 David Chelimsky dev-support: update relish task
dchelimsky authored
40 desc "Push docs/cukes to relishapp using the relish-client-gem"
22d41fb David Chelimsky add a little relish
dchelimsky authored
41 task :relish, :version do |t, args|
42 raise "rake relish[VERSION]" unless args[:version]
f57a594 David Chelimsky move changelog to project root
dchelimsky authored
43 sh "cp Changelog.md features/"
2b10fc0 David Chelimsky dev-support: update relish task
dchelimsky authored
44 sh "relish push rspec/rspec-expectations:#{args[:version]}"
f57a594 David Chelimsky move changelog to project root
dchelimsky authored
45 sh "rm features/Changelog.md"
22d41fb David Chelimsky add a little relish
dchelimsky authored
46 end
47
1e001c2 David Chelimsky 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 David Chelimsky don't diff single line strings
dchelimsky authored
57 rm_rf 'doc'
9cd937b David Chelimsky dev: clobber docs
dchelimsky authored
58 rm_rf '.yardoc'
d40404d David Chelimsky add clobber task
dchelimsky authored
59 rm_rf 'pkg'
60 rm_rf 'tmp'
61 rm_rf 'coverage'
62 end
5ee3840 David Chelimsky dev: exclude rcov for ruby 1.9
dchelimsky authored
63
64 task :default => [:spec, :cucumber]
Something went wrong with that request. Please try again.