-
Notifications
You must be signed in to change notification settings - Fork 0
/
Rakefile
51 lines (41 loc) · 1.02 KB
/
Rakefile
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
40
41
42
43
44
45
46
47
48
49
50
51
#
#
#
GEMSPEC = "carray.gemspec"
task :install do
spec = eval File.read(GEMSPEC)
version_h = `ruby ext/version.rb`.chomp
if spec.version.to_s != version_h
STDERR.puts "Mismatch in version between carray.gemspec and version.h"
STDERR.puts " carray.gemspec - #{spec.version.to_s }"
STDERR.puts " version.h - #{version_h}"
STDERR.puts "Please check!"
exit(1)
end
system %{
gem build #{GEMSPEC}; gem install #{spec.full_name}.gem --no-document
}
end
require 'rspec/core/rake_task'
RSpec::Core::RakeTask.new
__END__
require 'rake'
require 'rake/testtask'
require 'rspec/core/rake_task'
task :default => :test
GEMSPEC = "carray.gemspec"
task :install do
spec = eval File.read(GEMSPEC)
system %{
gem build #{GEMSPEC}; gem install #{spec.full_name}.gem
}
end
desc "Run the tests"
Rake::TestTask::new(:test) do |t|
t.test_files = FileList['test/test_ALL.rb']
t.verbose = true
end
RSpec::Core::RakeTask.new(:spec) do |t|
t.pattern = "spec/**/*_spec.rb"
t.rspec_opts = ["-c", "-fs"]
end