/
Rakefile
36 lines (27 loc) · 882 Bytes
/
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
require 'rubygems'
require 'rake'
require 'cucumber'
require 'cucumber/rake/task'
require 'drb'
require File.join( File.dirname(__FILE__), "features", "support", "grails", "grails" )
desc "Run the Cucumber tests."
Cucumber::Rake::Task.new(:features) do |t|
t.cucumber_opts = "--format pretty"
end
desc "Start the Grails server in the background so you can run tests faster."
task :grails do
# Create a GrailsApplication instance for the directory
# where the tests are being run
grails = Grails::Application.new(Dir.pwd, true)
# start up the DRb service
DRb.start_service "druby://localhost:10808", grails
# We need the uri of the service to connect a client
puts "Puppeteering at: #{DRb.uri}"
# wait for the DRb service to finish before exiting
begin
DRb.thread.join
rescue Interrupt
grails.shutdown!
end
end
task :default => ['features']