Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100644 56 lines (46 sloc) 1.602 kB
cb7eae1 @jferris Fixed rspec2/rails3 integration; added integration tests for macros/m…
jferris authored
1 require 'rubygems'
6aca717 @jferris Extracted the context framework, switched to rspec
jferris authored
2 require 'bundler/setup'
0607826 Added rake test task
tsaleh authored
3 require 'rake'
4 require 'rake/rdoctask'
864a35f @rmm5t Added gem related rake tasks [#55]
rmm5t authored
5 require 'rake/gempackagetask'
6aca717 @jferris Extracted the context framework, switched to rspec
jferris authored
6 require 'rspec/core/rake_task'
7 require 'cucumber/rake/task'
44847c6 @sikachu Add Appraisals to the project to handle testing against multiple Rail…
sikachu authored
8 require 'appraisal'
18229ed @rmm5t Moved VERSION constant into a more discoverable file
rmm5t authored
9
10 $LOAD_PATH.unshift("lib")
56b0a04 @jferris Move into the Matchers namespace
jferris authored
11 require 'shoulda/matchers/version'
0607826 Added rake test task
tsaleh authored
12
1ecd029 - documentation
tsaleh authored
13 Rake::RDocTask.new { |rdoc|
14 rdoc.rdoc_dir = 'doc'
e9eba10 documentation and fixes to :through test
tsaleh authored
15 rdoc.title = "Shoulda -- Making tests easy on the fingers and eyes"
2b8d59f @rmm5t --inline-source is no longer an option in rdoc v2.4
rmm5t authored
16 rdoc.options << '--line-numbers'
1ecd029 - documentation
tsaleh authored
17 rdoc.template = "#{ENV['template']}.rb" if ENV['template']
5e42226 fixed order of doc files
Tammer Saleh authored
18 rdoc.rdoc_files.include('README.rdoc', 'CONTRIBUTION_GUIDELINES.rdoc', 'lib/**/*.rb')
1ecd029 - documentation
tsaleh authored
19 }
20
6aca717 @jferris Extracted the context framework, switched to rspec
jferris authored
21 RSpec::Core::RakeTask.new do |t|
22 t.pattern = "spec/**/*_spec.rb"
4ee78bf @jferris Fixes for Rails 3.0.3 and RSpec 2.3
jferris authored
23 t.rspec_opts = '--color --format progress'
24 t.verbose = false
6aca717 @jferris Extracted the context framework, switched to rspec
jferris authored
25 end
26
e1a5426 @rmm5t Added 'rake coverage' for an rcov report
rmm5t authored
27 desc "Run code-coverage analysis using rcov"
6aca717 @jferris Extracted the context framework, switched to rspec
jferris authored
28 RSpec::Core::RakeTask.new(:coverage) do |t|
4ee78bf @jferris Fixes for Rails 3.0.3 and RSpec 2.3
jferris authored
29 t.rspec_opts = '--color --format progress'
6aca717 @jferris Extracted the context framework, switched to rspec
jferris authored
30 t.rcov = true
31 t.rcov_opts = %{--exclude osx\/objc,spec,gems\/ --failure-threshold 100}
32 t.pattern = "spec/**/*_spec.rb"
e1a5426 @rmm5t Added 'rake coverage' for an rcov report
rmm5t authored
33 end
34
56b0a04 @jferris Move into the Matchers namespace
jferris authored
35 eval("$specification = begin; #{IO.read('shoulda-matchers.gemspec')}; end")
2b78030 @jferris Use a dynamic gemspec instead of generating one from the Rakefile; up…
jferris authored
36 Rake::GemPackageTask.new $specification do |pkg|
864a35f @rmm5t Added gem related rake tasks [#55]
rmm5t authored
37 pkg.need_tar = true
38 pkg.need_zip = true
39 end
40
41 desc "Clean files generated by rake tasks"
42 task :clobber => [:clobber_rdoc, :clobber_package]
cb7eae1 @jferris Fixed rspec2/rails3 integration; added integration tests for macros/m…
jferris authored
43
2320a8c @jferris Don't test Rails 2
jferris authored
44 Cucumber::Rake::Task.new do |t|
44847c6 @sikachu Add Appraisals to the project to handle testing against multiple Rail…
sikachu authored
45 t.fork = false
2320a8c @jferris Don't test Rails 2
jferris authored
46 t.cucumber_opts = ['--format', (ENV['CUCUMBER_FORMAT'] || 'progress')]
cb7eae1 @jferris Fixed rspec2/rails3 integration; added integration tests for macros/m…
jferris authored
47 end
48
6aca717 @jferris Extracted the context framework, switched to rspec
jferris authored
49 desc 'Default: run specs and cucumber features'
44847c6 @sikachu Add Appraisals to the project to handle testing against multiple Rail…
sikachu authored
50 task :default => [:all]
cb7eae1 @jferris Fixed rspec2/rails3 integration; added integration tests for macros/m…
jferris authored
51
44847c6 @sikachu Add Appraisals to the project to handle testing against multiple Rail…
sikachu authored
52 desc 'Test the plugin under all supported Rails versions.'
9078208 @sikachu Fix Rake task syntax in Rakefile
sikachu authored
53 task :all => ["appraisal:cleanup", "appraisal:install"] do |t|
44847c6 @sikachu Add Appraisals to the project to handle testing against multiple Rail…
sikachu authored
54 exec('rake appraisal spec cucumber')
55 end
Something went wrong with that request. Please try again.