forked from joakimk/testbot
/
Rakefile
41 lines (33 loc) · 1.1 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
require 'bundler'
# TODO: Add when possible. Currently "rake test" fails.
#require 'bundler/setup'
require 'cucumber'
require 'cucumber/rake/task'
Bundler::GemHelper.install_tasks
task :default => [ :test, :features ] do
end
desc "Run Test::Unit tests"
task :test do
Dir["test/**/test_*.rb"].each { |test| require(File.expand_path(test)) }
end
desc "Used for quickly deploying and testing updates without pusing to rubygems.org"
task :deploy do
ENV['TESTBOT_DEV_DEPLOY'] = '1'
gem_file = "testbot-#{Testbot.version}.gem"
config = YAML.load_file(".deploy_config.yml")
Rake::Task["build"].invoke
system(config["upload_gem"].gsub(/GEM_FILE/, gem_file)) || fail
system(config["update_and_restart_server"].gsub(/GEM_FILE/, gem_file)) || fail
end
Cucumber::Rake::Task.new(:features) do |t|
t.cucumber_opts = "features --format progress"
end
# HACK: As we use RVM to install gems while running cucumber we don't want bundler
# to raise an error like "rails is not part of the bundle. Add it to Gemfile.".
module Cucumber::Rake
class Task::ForkedCucumberRunner
def runner
[ RUBY ]
end
end
end