Repository navigation
Expand file tree
/
Copy pathrakefile
More file actions
66 lines (56 loc) · 1.81 KB
/
Copy pathrakefile
File metadata and controls
66 lines (56 loc) · 1.81 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
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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
#!/usr/bin/ruby
# ruby rakefile for building test_off gem
# and running tests
# running the tests requires rspec and cucumber to be installed
require 'rake/clean'
require 'rubygems'
require 'rake/gempackagetask'
require 'spec/rake/spectask'
require 'cucumber/rake/task'
# filelists
CLEAN.include('pkg','reports')
directory 'pkg'
# ----------------------
# gem specification
# ----------------------
spec = Gem::Specification.new do |s|
s.platform = Gem::Platform::RUBY
s.name = "test_off"
s.version = "0.2"
s.author = "Edward Sumitra"
s.email = "ed_sumitra@yahoo.com"
s.summary = "A library for Behavior Driven development of VBA code"
s.requirements = "MS Office, rspec and cucumber to run tests"
s.files = FileList['lib/*.rb', 'features/*.*','features/data/*.*','features/step_definitions/*.*','test/**/*.*'].to_a
s.require_path = "lib"
s.has_rdoc = false
s.date = %q{2009-07-13}
s.description = %q{A library for Behavior Driven Development of VBA code}
s.homepage = %q{http://github.com/esumitra/test_off}
end
Rake::GemPackageTask.new(spec) do |pkg|
pkg.need_tar = true
end
# ----------------------
# build gem
# ----------------------
desc 'build installable gem'
task :gem => "pkg/#{spec.name}-#{spec.version}.gem" do
puts "generated gem pkg/#{spec.name}-#{spec.version}.gem"
end
# ----------------------
# run rspec tests
# ----------------------
desc "Run RSpec tests"
Spec::Rake::SpecTask.new('rspec_tests') do |t|
t.spec_files = FileList['test/rspec/*.rb']
t.spec_opts = ["--format html:reports/rspec_tests.html"]
t.fail_on_error = false
end
# ----------------------
# run cucumber tests
# ----------------------
desc 'run cucumber tests'
Cucumber::Rake::Task.new do |t|
t.cucumber_opts = %w{--format pretty -q --guess}
end