Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Fetching contributors…

Cannot retrieve contributors at this time

file 25 lines (22 sloc) 0.69 kb
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25
begin
  require 'rspec/core/rake_task'
rescue LoadError
  # no spec tasks
else
  task :default => :spec

  desc 'Run ALL OF the specs'
  RSpec::Core::RakeTask.new(:spec) do |t|
    # t.ruby_opts = '-w'
    t.pattern = 'spec/finders/active_record_spec.rb' if ENV['DB'] and ENV['DB'] != 'sqlite3'
  end

  namespace :spec do
    desc "Run Rails specs"
    RSpec::Core::RakeTask.new(:rails) do |t|
      t.pattern = %w'spec/finders/active_record_spec.rb spec/view_helpers/action_view_spec.rb'
    end
  end
end

desc 'Run specs against both Rails 3.1 and Rails 3.0'
task :rails3 do |variable|
  system 'bundle exec rake spec && BUNDLE_GEMFILE=Gemfile.rails3.0 bundle exec rake spec:rails'
end
Something went wrong with that request. Please try again.