Commit b13162cd1d96c80389cc59ba2e2ee4a49f11af2c
1 parent
9090e470
Exists in
master
and in
1 other branch
Remove rspec rails_helper
Showing
3 changed files
with
2 additions
and
51 deletions
Show diff stats
spec/helpers/application_helper_spec.rb
| 1 | -require 'rails_helper' | ||
| 2 | - | ||
| 3 | -# Specs in this file have access to a helper object that includes | ||
| 4 | -# the AbcHelper. For example: | ||
| 5 | -# | ||
| 6 | -# describe AbcHelper do | ||
| 7 | -# describe "string concat" do | ||
| 8 | -# it "concats two strings with spaces" do | ||
| 9 | -# helper.concat_strings("this","that").should == "this that" | ||
| 10 | -# end | ||
| 11 | -# end | ||
| 12 | -# end | ||
| 13 | - | ||
| 14 | describe ApplicationHelper do | 1 | describe ApplicationHelper do |
| 15 | let(:notice) { Fabricate(:notice) } | 2 | let(:notice) { Fabricate(:notice) } |
| 16 | describe "#generate_problem_ical" do | 3 | describe "#generate_problem_ical" do |
spec/rails_helper.rb
| @@ -1,38 +0,0 @@ | @@ -1,38 +0,0 @@ | ||
| 1 | -# This file is copied to spec/ when you run 'rails generate rspec:install' | ||
| 2 | -ENV["RAILS_ENV"] ||= 'test' | ||
| 3 | -require 'spec_helper' | ||
| 4 | -require File.expand_path("../../config/environment", __FILE__) | ||
| 5 | -require 'rspec/rails' | ||
| 6 | -# Add additional requires below this line. Rails is not loaded until this point! | ||
| 7 | - | ||
| 8 | -# Requires supporting ruby files with custom matchers and macros, etc, in | ||
| 9 | -# spec/support/ and its subdirectories. Files matching `spec/**/*_spec.rb` are | ||
| 10 | -# run as spec files by default. This means that files in spec/support that end | ||
| 11 | -# in _spec.rb will both be required and run as specs, causing the specs to be | ||
| 12 | -# run twice. It is recommended that you do not name files matching this glob to | ||
| 13 | -# end with _spec.rb. You can configure this pattern with the --pattern | ||
| 14 | -# option on the command line or in ~/.rspec, .rspec or `.rspec-local`. | ||
| 15 | -# | ||
| 16 | -# The following line is provided for convenience purposes. It has the downside | ||
| 17 | -# of increasing the boot-up time by auto-requiring all files in the support | ||
| 18 | -# directory. Alternatively, in the individual `*_spec.rb` files, manually | ||
| 19 | -# require only the support files necessary. | ||
| 20 | -# | ||
| 21 | -# Dir[Rails.root.join("spec/support/**/*.rb")].each { |f| require f } | ||
| 22 | - | ||
| 23 | -RSpec.configure do |config| | ||
| 24 | - # RSpec Rails can automatically mix in different behaviours to your tests | ||
| 25 | - # based on their file location, for example enabling you to call `get` and | ||
| 26 | - # `post` in specs under `spec/controllers`. | ||
| 27 | - # | ||
| 28 | - # You can disable this behaviour by removing the line below, and instead | ||
| 29 | - # explicitly tag your specs with their type, e.g.: | ||
| 30 | - # | ||
| 31 | - # RSpec.describe UsersController, :type => :controller do | ||
| 32 | - # # ... | ||
| 33 | - # end | ||
| 34 | - # | ||
| 35 | - # The different available types are documented in the features, such as in | ||
| 36 | - # https://relishapp.com/rspec/rspec-rails/docs | ||
| 37 | - config.infer_spec_type_from_file_location! | ||
| 38 | -end |
spec/spec_helper.rb
| @@ -47,6 +47,8 @@ RSpec.configure do |config| | @@ -47,6 +47,8 @@ RSpec.configure do |config| | ||
| 47 | config.before(:each, type: :helper) do |_| | 47 | config.before(:each, type: :helper) do |_| |
| 48 | init_haml_helpers | 48 | init_haml_helpers |
| 49 | end | 49 | end |
| 50 | + | ||
| 51 | + config.infer_spec_type_from_file_location! | ||
| 50 | end | 52 | end |
| 51 | 53 | ||
| 52 | OmniAuth.config.test_mode = true | 54 | OmniAuth.config.test_mode = true |