Skip to content

Reload RSpec support files

Tobias L. Maier edited this page Dec 22, 2013 · 2 revisions
# ./spec/spec_helper.rb
def zeus_running?
  File.exists? '.zeus.sock'
end

unless zeus_running?
  Dir[Rails.root.join('spec/support/**/*.rb')].each { |f| require f }
end
# ./custom_plan.rb
require 'zeus/rails'

class CustomPlan < Zeus::Rails
  def test
    Dir[Rails.root.join('spec/support/**/*.rb')].each { |f| require f }
    super
  end
end

Zeus.plan = CustomPlan.new