Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 35 lines (29 sloc) 1.085 kb
bed886a @nesquena Merge branch 'feature/json-encoding-integration'
nesquena authored
1 include Rake::DSL
2
eec7acb @nesquena Initial commit to rabl
nesquena authored
3 require 'bundler'
4 Bundler::GemHelper.install_tasks
7517ad2 @achiu add watchr, add rake test
achiu authored
5
6 require 'rake/testtask'
7 Rake::TestTask.new(:test) do |test|
8 test.libs << 'lib' << 'test'
4c490a1 @nesquena [Rakefile] Only run top-level tests by default
nesquena authored
9 test.pattern = 'test/*_test.rb'
e7a5815 @achiu fix uninitialized warnings
achiu authored
10 test.warning = true
7517ad2 @achiu add watchr, add rake test
achiu authored
11 test.verbose = true
a040956 @achiu pass rubygems option in rake test
achiu authored
12 test.ruby_opts = ['-rubygems']
7517ad2 @achiu add watchr, add rake test
achiu authored
13 end
fd8d255 @nesquena Adds default rake task for travis
nesquena authored
14
7e79a61 @nesquena Cleanup Rakefile fixture tests tasks
nesquena authored
15 desc "Prepares the fixtures for being tested by installing dependencies"
16 task "test:setup" do
e7d83b9 @nesquena [fixtures] Adds rails 3.2 integration testing
nesquena authored
17 Dir[File.dirname(__FILE__) + "/fixtures/{padrino_test,sinatra_test,rails2,rails3,rails3_2}"].each do |fixture|
7e79a61 @nesquena Cleanup Rakefile fixture tests tasks
nesquena authored
18 puts "\n*** Setting up for #{File.basename(fixture)} tests ***\n"
56c3bb8 @nesquena Fixes travis integration tests?
nesquena authored
19 `export BUNDLE_GEMFILE=#{fixture}/Gemfile` if ENV['TRAVIS']
7e79a61 @nesquena Cleanup Rakefile fixture tests tasks
nesquena authored
20 puts `cd #{fixture}; bundle install;`
dc5f6c9 @nesquena [Rakefile] Add test:full which runs the fixture tests
nesquena authored
21 end
809ba6d @nesquena [sinatra fixture] Adds sinatra fixture tests
nesquena authored
22 end
23
7e79a61 @nesquena Cleanup Rakefile fixture tests tasks
nesquena authored
24 desc "Executes the fixture tests"
25 task "test:fixtures" do
e7d83b9 @nesquena [fixtures] Adds rails 3.2 integration testing
nesquena authored
26 Dir[File.dirname(__FILE__) + "/fixtures/{padrino_test,sinatra_test,rails2,rails3,rails3_2}"].each do |fixture|
7e79a61 @nesquena Cleanup Rakefile fixture tests tasks
nesquena authored
27 puts "\n*** Running tests for #{File.basename(fixture)}... ***\n"
28 puts `cd #{fixture}; bundle check; bundle exec rake test:rabl`
29 end
30 end
31
32 task "test:full" => [:test, "test:fixtures"]
33
809ba6d @nesquena [sinatra fixture] Adds sinatra fixture tests
nesquena authored
34 desc "Run tests for rabl"
a092746 @nesquena Back to 'test' as the rake default
nesquena authored
35 task :default => :test
Something went wrong with that request. Please try again.