Skip to content

HTTPS clone URL

Subversion checkout URL

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