-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathRakefile
More file actions
39 lines (32 loc) · 661 Bytes
/
Copy pathRakefile
File metadata and controls
39 lines (32 loc) · 661 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
35
36
37
38
39
require 'rubygems'
def unable_to_load
STDERR.puts <<-EOS
To use rspec for testing you must install rspec gem:
gem install rspec
EOS
nil
end
def require_spec
require 'spec/expectations'
rescue LoadError
require_spec_with_rubygems
end
def require_spec_with_rubygems
require 'rubygems'
require 'spec/expectations'
rescue LoadError
unable_to_load
end
if require_spec
begin
require 'spec/rake/spectask'
rescue LoadError
unable_to_load
end
desc "Run specs"
Spec::Rake::SpecTask.new do |t|
t.spec_opts = ['--options', "spec/spec.opts"]
t.spec_files = FileList['spec/**/*_spec.rb']
end
end
task :default => :spec