gitlab-org--gitlab-foss/features/support/env.rb
Robert Speicher 4252ea90c0 Add feature steps for a generic, non-"Shop" project
This group is better for features that only deal with one project.
2012-09-26 16:32:24 -04:00

29 lines
676 B
Ruby

ENV['RAILS_ENV'] = 'test'
require './config/environment'
require 'rspec'
require 'database_cleaner'
require 'spinach/capybara'
%w(gitolite_stub stubbed_repository valid_commit).each do |f|
require Rails.root.join('spec', 'support', f)
end
Dir["#{Rails.root}/features/steps/shared/*.rb"].each {|file| require file}
include GitoliteStub
WebMock.allow_net_connect!
Capybara.javascript_driver = :webkit
DatabaseCleaner.strategy = :truncation
Spinach.hooks.before_scenario { DatabaseCleaner.start }
Spinach.hooks.after_scenario { DatabaseCleaner.clean }
Spinach.hooks.before_run do
RSpec::Mocks::setup self
include FactoryGirl::Syntax::Methods
stub_gitolite!
end