Skip to content

HTTPS clone URL

Subversion checkout URL

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