Skip to content

Commit

Permalink
Fix a spec on Rails edge
Browse files Browse the repository at this point in the history
E.g. https://github.com/rspec/rspec-rails/actions/runs/4737397779/jobs/8410153979?pr=2664

expected /Title can't be blank/, got #<RSpec::Expectations::ExpectationNotMetError: expected #<Post:0x000055d41c8941d0 @validation_context=nil, @errors=#<ActiveModel::Errors [#<ActiveModel::Error attribute=title, type=blank, options={}>]>> to be valid, but got errors: Title can’t be blank>

The difference is in the typographic quote:
rails/rails@da82e58#diff-78b236371af76b069c91eedb316bb68bfe71ab6bd1850f7c5a4c9291eaa13c79R16
  • Loading branch information
pirj authored and JonRowe committed May 4, 2023
1 parent f56d3c7 commit 9cfc3ea
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion spec/rspec/rails/matchers/be_valid_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ def errors(_)
it "includes the error messages in the failure message" do
expect {
expect(post).to be_valid
}.to raise_exception(/Title can't be blank/)
}.to raise_exception(/Title can.t be blank/)
end

it "includes the error messages for simple implementations of error messages" do
Expand Down

0 comments on commit 9cfc3ea

Please sign in to comment.