forked from rughh/on_ruby
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathspec_helper.rb
37 lines (29 loc) · 1 KB
/
spec_helper.rb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
ENV['RAILS_ENV'] ||= 'test'
ENV['SECRET_TOKEN'] ||= 'SECRET_TOKEN_TEST_b7c7374eb0285b87c0c1c61c2c5401b9f92dd59209713801743202c'
require File.expand_path('../config/environment', __dir__)
require 'rspec/rails'
Dir[Rails.root.join('spec/support/**/*.rb')].each { |file| require file }
RSpec.configure do |config|
config.include RequestHelper, type: :controller
config.include RequestHelper, type: :request
config.include KaminariHelper
config.include GeocoderHelper
config.include FactoryBot::Syntax::Methods
# config.raise_errors_for_deprecations!
config.infer_spec_type_from_file_location!
config.use_transactional_fixtures = true
config.filter_run focus: true
config.run_all_when_everything_filtered = true
config.before do
I18n.locale = :de
Whitelabel.label = Whitelabel.labels.first
stub_geocoder
end
config.before(:each, type: :request) do
host! 'hamburg.onruby.test'
end
config.before(:each, type: :controller) do
set_subdomain
end
end
include OnlineHelper