spec/spec_helper.rb in bradgessler-domain_slice-0.0.0 vs spec/spec_helper.rb in bradgessler-domain_slice-0.1.0
- old
+ new
@@ -1,12 +1,24 @@
require 'rubygems'
require 'spec'
+# Loads various ruby files and application stacks for testing purposes
module DomainSlice
module TestHelpers
class << self
- def require_domain_slice
+ def require_domain_slice!
require File.join(File.dirname(__FILE__), %w[.. lib domain_slice])
+ end
+
+ def require_middleware!
+ require 'rack'
+ require File.join(File.dirname(__FILE__), %w[.. lib domain_slice middleware])
+ end
+
+ def require_rails!
+ # Load whatever is needed to test domain slice integration with rails
+ # require 'rails'
+ require File.join(File.dirname(__FILE__), %w[.. lib domain_slice rails])
end
end
end
end
\ No newline at end of file