File tree Expand file tree Collapse file tree 4 files changed +8
-15
lines changed
Expand file tree Collapse file tree 4 files changed +8
-15
lines changed Original file line number Diff line number Diff line change 5252 # Install the Timber.io logger, but do not send logs.
5353 logger = Timber ::Logger . new ( nil )
5454 logger . level = config . log_level
55- config . logger = ActiveSupport ::TaggedLogging . new ( logger )
55+ # config.logger = ActiveSupport::TaggedLogging.new(logger)
56+ config . logger = Logger . new ( nil )
57+ config . log_level = :fatal
5658end
Original file line number Diff line number Diff line change 1212 name { Faker ::Name . name }
1313 email { generate :email }
1414 username { generate :username }
15- profile_image { image }
15+ # profile_image { image }
1616 twitter_username { generate :twitter_username }
1717 github_username { generate :github_username }
1818 summary { Faker ::Lorem . paragraph [ 0 ..rand ( 190 ) ] }
Original file line number Diff line number Diff line change 4040RSpec . configure do |config |
4141 config . fixture_path = "#{ ::Rails . root } /spec/fixtures"
4242
43+ config . use_transactional_fixtures = true
44+
4345 config . include ApplicationHelper
4446 config . include Devise ::Test ::ControllerHelpers , type : :controller
4547 config . include Devise ::Test ::ControllerHelpers , type : :view
Original file line number Diff line number Diff line change 11require "database_cleaner"
22
33RSpec . configure do |config |
4+ return if config . use_transactional_fixtures?
5+
46 config . use_transactional_fixtures = false
57
68 config . before ( :suite ) do
7- if config . use_transactional_fixtures?
8- raise ( <<-MSG )
9- Delete line `config.use_transactional_fixtures = true` from rails_helper.rb
10- (or set it to false) to prevent uncommitted transactions being used in
11- JavaScript-dependent specs.
12-
13- During testing, the app-under-test that the browser driver connects to
14- uses a different database connection to the database connection used by
15- the spec. The app's database connection would not be able to access
16- uncommitted transaction data setup over the spec's database connection.
17- MSG
18- end
19-
209 DatabaseCleaner . clean_with ( :truncation )
2110 end
2211
You can’t perform that action at this time.
0 commit comments