Moving from 'should' syntax to 'expect' (#16084)

In Travis I found the following message:

> Using `should` from rspec-expectations' old `:should` syntax without
> explicitly enabling the syntax is deprecated. Use the new `:expect`
> syntax or explicitly enable `:should` with
> `config.expect_with(:rspec) > { |c| c.syntax = :should }`
> instead. Called from
> /home/travis/build/forem/forem/spec/models/html_variant_spec.rb:76:in
> `block (2 levels) in <main>'.
This commit is contained in:
Jeremy Friesen 2022-01-13 00:33:42 -05:00 committed by GitHub
parent 760a81383b
commit 6929cd908c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -73,6 +73,6 @@ RSpec.describe HtmlVariant, type: :model do
it "strips whitespace from the name" do
variant = create(:html_variant, name: " hello world ")
variant.reload.name.should eq "hello world"
expect(variant.reload.name).to eq "hello world"
end
end