-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathRakefile
More file actions
34 lines (26 loc) · 748 Bytes
/
Rakefile
File metadata and controls
34 lines (26 loc) · 748 Bytes
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
26
27
28
29
30
31
32
33
34
# encoding: utf-8
if ENV["BUNDLE_GEMFILE"] == File.expand_path("Gemfile")
ENV["BUNDLE_GEMFILE"] = "gemfiles/Gemfile.rails-3.2.x"
end
require 'bundler'
Bundler::GemHelper.install_tasks
begin
targeted_files = ARGV.drop(1)
file_pattern = targeted_files.empty? ? 'spec/**/*_spec.rb' : targeted_files
require 'rspec/core'
require 'rspec/core/rake_task'
RSpec::Core::RakeTask.new(:spec) do |t|
t.pattern = FileList[file_pattern]
end
RSpec.configure do |config|
config.color_enabled = true
config.formatter = :documentation
end
rescue LoadError
require 'spec/rake/spectask'
puts file_pattern
Spec::Rake::SpecTask.new(:spec) do |t|
t.pattern = FileList[file_pattern]
t.spec_opts += ["--color"]
end
end