Skip to content
Newer
Older
100644 26 lines (22 sloc) 690 Bytes
015d53a @mislav setup continuous integration testing with Travis-CI
mislav authored
1 begin
2 require 'rspec/core/rake_task'
3 rescue LoadError
4 # no spec tasks
5 else
16636f5 @mislav Travis CI: don't try to test mysql2 adapter on Rails 3.0
mislav authored
6 task :default => :spec
d882efc @mislav cleanup loading in Rakefile
mislav authored
7
015d53a @mislav setup continuous integration testing with Travis-CI
mislav authored
8 desc 'Run ALL OF the specs'
9 RSpec::Core::RakeTask.new(:spec) do |t|
10 # t.ruby_opts = '-w'
11 t.pattern = 'spec/finders/active_record_spec.rb' if ENV['DB'] and ENV['DB'] != 'sqlite3'
f703f88 @mislav Rails 3.1, RSpec 2 compatibility
mislav authored
12 end
13
015d53a @mislav setup continuous integration testing with Travis-CI
mislav authored
14 namespace :spec do
15 desc "Run Rails specs"
16 RSpec::Core::RakeTask.new(:rails) do |t|
17 t.pattern = %w'spec/finders/active_record_spec.rb spec/view_helpers/action_view_spec.rb'
18 end
19 end
079d0d8 Awesome new features, supersmart tests, great coverage!
mislav authored
20 end
1464c8b @mislav gemify
mislav authored
21
015d53a @mislav setup continuous integration testing with Travis-CI
mislav authored
22 desc 'Run specs against both Rails 3.1 and Rails 3.0'
23 task :rails3 do |variable|
24 system 'bundle exec rake spec && BUNDLE_GEMFILE=Gemfile.rails3.0 bundle exec rake spec:rails'
d882efc @mislav cleanup loading in Rakefile
mislav authored
25 end
Something went wrong with that request. Please try again.