diff --git a/.gitignore b/.gitignore index 5a69612b2..07968053a 100644 --- a/.gitignore +++ b/.gitignore @@ -11,6 +11,7 @@ config/certs/* config/cli_environments/development.rb config/cli_environments/stage.rb config/cli_environments/local.rb +db/*.sqlite3 spec/test_data/logging/* doc/* log/* diff --git a/.rspec b/.rspec index 4e1e0d2f7..83e16f804 100644 --- a/.rspec +++ b/.rspec @@ -1 +1,2 @@ --color +--require spec_helper diff --git a/Gemfile b/Gemfile index 7180a0aff..23dc561e4 100644 --- a/Gemfile +++ b/Gemfile @@ -53,6 +53,7 @@ end group :development, :test do gem 'byebug' + gem 'rspec-rails', '~> 3.7' gem 'rubocop', '~> 0.58' gem 'rubocop-rspec' end diff --git a/Gemfile.lock b/Gemfile.lock index 6f1b92abd..125c344c2 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -349,6 +349,14 @@ GEM rspec-mocks (3.8.0) diff-lcs (>= 1.2.0, < 2.0) rspec-support (~> 3.8.0) + rspec-rails (3.8.0) + actionpack (>= 3.0) + activesupport (>= 3.0) + railties (>= 3.0) + rspec-core (~> 3.8.0) + rspec-expectations (~> 3.8.0) + rspec-mocks (~> 3.8.0) + rspec-support (~> 3.8.0) rspec-support (3.8.0) rubocop (0.58.2) jaro_winkler (~> 1.5.1) @@ -475,6 +483,7 @@ DEPENDENCIES retries roo rspec (~> 3.0) + rspec-rails (~> 3.7) rubocop (~> 0.58) rubocop-rspec ruby-prof diff --git a/spec/rails_helper.rb b/spec/rails_helper.rb index 18009db9d..4c853b8c8 100644 --- a/spec/rails_helper.rb +++ b/spec/rails_helper.rb @@ -5,6 +5,7 @@ # Prevent database truncation if the environment is production abort("The Rails environment is running in production mode!") if Rails.env.production? +require 'rspec/rails' # Add additional requires below this line. Rails is not loaded until this point! # auto-require all ruby files in the support directory