-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathcustom_plan.rb
51 lines (41 loc) · 964 Bytes
/
custom_plan.rb
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
require 'zeus/rails'
# This custom plan (and the zeus.json file altogether) allows us
# to use zeus and rspec without rails...
#
# However, there is one gotcha: zeus only can execute correctly
# if we use a Gemfile with zeus and install the dependencies
# as binstubs. Otherwise, Zeus will never load the commands.
#
# To install as binstubs, use
#
# bundle install --binstubs
#
# Then, run:
#
# bin/zeus start
#
# because the binstubs puts the gem executables
# into bin/ folder
class CustomPlan < Zeus::Plan
def boot
end
def default_env
require 'sunat/dependencies'
end
def test_helper
require_relative 'spec/spec_helper'
end
def test(argv=ARGV)
RSpec::Core::Runner.disable_autorun!
exit RSpec::Core::Runner.run(argv)
end
def prerake
require 'rake'
require "bundler/gem_tasks"
require 'annotations/rake_task'
end
def rake
Rake.application.run
end
end
Zeus.plan = CustomPlan.new