Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 50 lines (38 sloc) 1.025 kb
4488469e » jk0
2012-05-03 First pass at fixing unit tests.
1 # Copyright (c) 2012 Piston Cloud Computing, Inc.
481ba37b » joshuamckenty
2012-04-29 Rough (prototype) starting points imported from jk0's fork of bosh up…
2
3 $:.unshift(File.expand_path("../../rake", __FILE__))
4
5 ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../Gemfile", __FILE__)
6
7 require "rubygems"
8 require "bundler"
9 Bundler.setup(:default, :test)
10
11 require "rake"
12 begin
13 require "rspec/core/rake_task"
14 rescue LoadError
15 end
16
4488469e » jk0
2012-05-03 First pass at fixing unit tests.
17 require "../bosh/rake/bundler_task"
18 require "../bosh/rake/ci_task"
481ba37b » joshuamckenty
2012-04-29 Rough (prototype) starting points imported from jk0's fork of bosh up…
19
20 gem_helper = Bundler::GemHelper.new(Dir.pwd)
21
22 desc "Build CPI gem into the pkg directory"
23 task "build" do
24 gem_helper.build_gem
25 end
26
27 desc "Build and install CPI into system gems"
28 task "install" do
29 Rake::Task["bundler:install"].invoke
30 gem_helper.install_gem
31 end
32
33 BundlerTask.new
34
35 if defined?(RSpec)
36 namespace :spec do
37 desc "Run Unit Tests"
38 rspec_task = RSpec::Core::RakeTask.new(:unit) do |t|
39 t.pattern = "spec/unit/**/*_spec.rb"
40 t.rspec_opts = %w(--format progress --colour)
41 end
42
43 CiTask.new do |task|
44 task.rspec_task = rspec_task
45 end
46 end
47
48 desc "Run tests"
49 task :spec => %w(spec:unit)
50 end
Something went wrong with that request. Please try again.