lib/bbq.rb in bbq-0.0.2 vs lib/bbq.rb in bbq-0.0.3
- old
+ new
@@ -1,7 +1,21 @@
-require 'bbq/railtie' if defined?(Rails)
+require 'pathname'
module Bbq
def self.root
@root ||= Pathname.new(File.expand_path(File.join(File.dirname(__FILE__), '..')))
end
+
+ def self.rails?
+ defined?(::Rails)
+ end
+
+ def self.app
+ Capybara.app
+ end
+
+ def self.app=(new_app)
+ Capybara.app=(new_app)
+ end
end
+
+require 'bbq/railtie' if Bbq.rails?
\ No newline at end of file