lib/combustion.rb in combustion-0.3.1 vs lib/combustion.rb in combustion-0.3.2
- old
+ new
@@ -10,22 +10,32 @@
modules.each { |mod| require "#{mod}/railtie" }
Combustion::Application.configure_for_combustion
Combustion::Application.initialize!
- silence_stream(STDOUT) do
- load "#{Rails.root}/db/schema.rb"
+ if modules.include?('active_record') || modules.include?(:active_record)
+ Combustion::Database.setup
end
RSpec.configure do |config|
include_capybara_into config
config.include(Combustion::Application.routes.url_helpers)
- config.include(Combustion::Application.routes.mounted_helpers)
+ if Combustion::Application.routes.respond_to?(:mounted_helpers)
+ config.include(Combustion::Application.routes.mounted_helpers)
+ end
end if defined?(RSpec) && RSpec.respond_to?(:configure)
end
+ def self.path
+ @path ||= 'spec/internal'
+ end
+
+ def self.path=(path)
+ @path = path
+ end
+
def self.include_capybara_into(config)
return unless defined?(Capybara)
config.include Capybara::RSpecMatchers if defined?(Capybara::RSpecMatchers)
config.include Capybara::DSL if defined?(Capybara::DSL)
@@ -35,6 +45,7 @@
end
end
end
require 'combustion/application'
+require 'combustion/database'
require 'combustion/version'