Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100644 57 lines (46 sloc) 1.55 kB
0a59e0c @yabawock Always use # encoding: utf-8 declaration
yabawock authored
1 # encoding: utf-8
6c57b54 @yabawock Test formtastic with Rails 3.0-3.2 using appraisals
yabawock authored
2 require 'bundler/setup'
3 require 'appraisal'
f8f761e @yabawock Use rdoc/task instead of deprecated rake/rdoctask
yabawock authored
4 require 'rdoc/task'
34848c4 @sobrinho Cleanup Rakefile
sobrinho authored
5 require 'rspec/core/rake_task'
050ef12 @justinfrench Added new rcov tasks, made spec_and_verify_coverage the default rake …
authored
6 require 'tasks/verify_rcov'
7f01af4 @kou switch to gemspec generated by bundler. #535 #548
kou authored
7
8 Bundler::GemHelper.install_tasks
dcf8beb Initial Commit
Justin French authored
9
281dd18 @xaviershay rspec support - test_helper and rake task
xaviershay authored
10 desc 'Default: run unit specs.'
6c57b54 @yabawock Test formtastic with Rails 3.0-3.2 using appraisals
yabawock authored
11 task :default => :all
12
13 desc 'Test formtastic with all supported Rails versions.'
14 task :all => ["appraisal:install"] do
15 exec('rake appraisal spec')
16 end
dcf8beb Initial Commit
Justin French authored
17
18 desc 'Generate documentation for the formtastic plugin.'
19 Rake::RDocTask.new(:rdoc) do |rdoc|
20 rdoc.rdoc_dir = 'rdoc'
21 rdoc.title = 'Formtastic'
22 rdoc.options << '--line-numbers' << '--inline-source'
8e2ca3a @justinfrench modified Rakefile to build with README.textile
authored
23 rdoc.rdoc_files.include('README.textile')
dcf8beb Initial Commit
Justin French authored
24 rdoc.rdoc_files.include('lib/**/*.rb')
25 end
7fef413 @justinfrench added a rake task 'specdoc' for running the specs with specdoc format…
authored
26
34848c4 @sobrinho Cleanup Rakefile
sobrinho authored
27 desc 'Test the formtastic plugin.'
28 RSpec::Core::RakeTask.new('spec') do |t|
29 t.pattern = FileList['spec/**/*_spec.rb']
a27aa2b @justinfrench Added in a Rake task for running the specs with rcov, plus a line in …
authored
30 end
b77e11a @yabawock Make Rakefile compatible with rails2 & rails3
yabawock authored
31
bd81cc7 @justinfrench Added a rspec:inputs task for testing just the inputs that I'm focusi…
authored
32 desc 'Test the formtastic inputs.'
33 RSpec::Core::RakeTask.new('spec:inputs') do |t|
10b7d3a @justinfrench include check_boxes in inputs spec rake task
authored
34 t.pattern = FileList['spec/inputs/*_spec.rb']
bd81cc7 @justinfrench Added a rspec:inputs task for testing just the inputs that I'm focusi…
authored
35 end
36
34848c4 @sobrinho Cleanup Rakefile
sobrinho authored
37 desc 'Test the formtastic plugin with specdoc formatting and colors'
38 RSpec::Core::RakeTask.new('specdoc') do |t|
39 t.pattern = FileList['spec/**/*_spec.rb']
40 end
b77e11a @yabawock Make Rakefile compatible with rails2 & rails3
yabawock authored
41
34848c4 @sobrinho Cleanup Rakefile
sobrinho authored
42 desc 'Run all examples with RCov'
050ef12 @justinfrench Added new rcov tasks, made spec_and_verify_coverage the default rake …
authored
43 RSpec::Core::RakeTask.new('rcov') do |t|
34848c4 @sobrinho Cleanup Rakefile
sobrinho authored
44 t.pattern = FileList['spec/**/*_spec.rb']
45 t.rcov = true
050ef12 @justinfrench Added new rcov tasks, made spec_and_verify_coverage the default rake …
authored
46 t.rcov_opts = %w(--exclude gems/*,spec/*,.bundle/*, --aggregate coverage.data)
47 end
48
49 RCov::VerifyTask.new(:verify_coverage) do |t|
50 t.require_exact_threshold = false
b66cb77 @justinfrench Remove coverage requirement for 1.9.2 & 1.9.3, add back to Travis.
authored
51 t.threshold = (RUBY_VERSION == "1.8.7" ? 95 : 0)
050ef12 @justinfrench Added new rcov tasks, made spec_and_verify_coverage the default rake …
authored
52 end
53
54 desc "Run all examples and verify coverage"
55 task :spec_and_verify_coverage => [:rcov, :verify_coverage] do
b77e11a @yabawock Make Rakefile compatible with rails2 & rails3
yabawock authored
56 end
Something went wrong with that request. Please try again.