Skip to content

Silence warning in mailer preview path check #2794

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Sep 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions example_app_generator/spec/verify_mailer_preview_path_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@ def capture_exec(*ops)
.reject { |line| line =~ /DEPRECATION WARNING/ }
.reject { |line| line =~ /warning: previous/ }
.reject { |line| line =~ /warning: already/ }
.reject { |line| line =~ /but will no longer be part of the default gems / }
.reject { |line| line =~ /You can add .* to your Gemfile/ }
.join
.chomp
CaptureExec.new(out, $?.exitstatus)
Expand Down
4 changes: 2 additions & 2 deletions features/backtrace_filtering.feature
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,9 @@ Feature: Backtrace filtering
Scenario: Using the bare `rspec` command
When I run `rspec`
Then the output should contain "1 example, 1 failure"
And the output should not contain "activesupport"
And the output should not contain "actionpack"

Scenario: Using `rspec --backtrace`
When I run `rspec --backtrace`
Then the output should contain "1 example, 1 failure"
And the output should contain "activesupport"
And the output should contain "actionpack"
8 changes: 7 additions & 1 deletion spec/rspec/rails/matchers/have_enqueued_mail_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -373,7 +373,13 @@ def self.name; "NonMailerJob"; end
}
end

context 'when parameterized', skip: !RSpec::Rails::FeatureCheck.has_action_mailer_parameterized? do
context 'when parameterized' do
before do
unless RSpec::Rails::FeatureCheck.has_action_mailer_parameterized?
skip "This version of Rails does not support parameterized mailers"
end
end

it "passes when mailer is parameterized" do
expect {
TestMailer.with('foo' => 'bar').test_email.deliver_later
Expand Down