Browse Source

rubocop

pull/64/head
magicmilo 3 years ago
parent
commit
073ccfe633
  1. 2
      Gemfile
  2. 2
      spec/models/case_log_spec.rb
  3. 3
      spec/rails_helper.rb

2
Gemfile

@ -49,10 +49,10 @@ end
group :test do
gem "capybara", require: false
gem "database_cleaner-active_record", require: false
gem "factory_bot_rails"
gem "selenium-webdriver", require: false
gem "simplecov", require: false
gem "database_cleaner-active_record", require: false
%w[rspec-core rspec-expectations rspec-mocks rspec-rails rspec-support].each do |lib|
gem lib, git: "https://github.com/rspec/#{lib}.git", branch: "main", require: false
end

2
spec/models/case_log_spec.rb

@ -176,7 +176,7 @@ RSpec.describe Form, type: :model do
expect {
CaseLog.create!(armed_forces: "No",
armed_forces_active: "Yes")
}.to raise_error
}.to raise_error(ActiveRecord::RecordInvalid)
end
# Crossover over tests here as injured must be answered as well for no error

3
spec/rails_helper.rb

@ -6,7 +6,7 @@ require File.expand_path("../config/environment", __dir__)
abort("The Rails environment is running in production mode!") if Rails.env.production?
require "rspec/rails"
require "capybara/rspec"
require 'database_cleaner/active_record'
require "database_cleaner/active_record"
# Comment to run `js: true specs` with visible browser interaction
Capybara.javascript_driver = :selenium_headless
@ -58,6 +58,7 @@ RSpec.configure do |config|
uncommitted transaction data setup over the spec's database connection.
MSG
end
DatabaseCleaner.clean_with(:truncation)
end

Loading…
Cancel
Save