Skip to content

Commit

Permalink
Update rspec template
Browse files Browse the repository at this point in the history
  • Loading branch information
elektronaut committed Feb 2, 2024
1 parent e42af67 commit 1e75fb3
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 17 deletions.
2 changes: 0 additions & 2 deletions lib/rails/generators/pages_core/rspec/rspec_generator.rb
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,12 @@ def setup_test_gems
def setup_rspec
create_file File.join(".rspec"), "--format Fuubar\n--colour\n" \
"--require spec_helper"
create_file File.join("spec/controllers/.keep")
create_file File.join("spec/mailers/preview/.keep")
create_file File.join("spec/models/.keep")
create_file File.join("spec/system/.keep")
template "spec_helper.rb", File.join("spec/spec_helper.rb")
template "rails_helper.rb", File.join("spec/rails_helper.rb")
template "factories.rb", File.join("spec/factories.rb")
template "mailer_macros.rb", File.join("spec/support/mailer_macros.rb")
template("page_templates_spec.rb",
File.join("spec/system/page_templates_spec.rb"))
end
Expand Down
11 changes: 0 additions & 11 deletions lib/rails/generators/pages_core/rspec/templates/mailer_macros.rb

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,16 @@
require "simplecov"
SimpleCov.start "rails" if ARGV.grep(/spec\.rb/).empty?

require "spec_helper"
require File.expand_path("../config/environment", __dir__)

# Prevent database truncation if the environment is production
if Rails.env.production?
abort("The Rails environment is running in production mode!")
end
require "spec_helper"
require "rspec/rails"
# Add additional requires below this line. Rails is not loaded until this point!

# Add additional requires below this line. Rails is not loaded until this point!
require "shoulda-matchers"

# Requires supporting ruby files with custom matchers and macros, etc, in
Expand All @@ -41,7 +41,7 @@

RSpec.configure do |config|
# Remove this line if you're not using ActiveRecord or ActiveRecord fixtures
config.fixture_path = Rails.root.join("spec/fixtures")
# config.fixture_paths = [Rails.root.join("spec/fixtures")]

# If you're not using ActiveRecord, or you'd prefer not to run each of your
# examples within a transaction, remove the following line or assign false
Expand Down Expand Up @@ -69,7 +69,6 @@
# config.filter_gems_from_backtrace("gem name")

config.include ActiveJob::TestHelper
config.include MailerMacros

# Use FactoryBot shorthand
config.include FactoryBot::Syntax::Methods
Expand Down

0 comments on commit 1e75fb3

Please sign in to comment.