Skip to content

Commit

Permalink
Merge pull request #2794 from rspec/fix-ruby-3-3-5
Browse files Browse the repository at this point in the history
Silence warning in mailer preview path check
  • Loading branch information
JonRowe committed Sep 4, 2024
1 parent e3cf607 commit bc6dfc7
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 3 deletions.
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

0 comments on commit bc6dfc7

Please sign in to comment.