mirror of
https://github.com/Homebrew/brew.git
synced 2025-07-14 16:09:03 +08:00

There’s too many warnings to start enabling `rubocop-rspec` by default but let’s at least apply the cleanups it does automatically.
15 lines
368 B
Ruby
15 lines
368 B
Ruby
require "extend/string"
|
|
|
|
describe StringInreplaceExtension do
|
|
subject { string.extend(described_class) }
|
|
|
|
let(:string) { "foobar" }
|
|
|
|
describe "#sub!" do
|
|
it "adds an error to #errors when no replacement was made" do
|
|
subject.sub! "not here", "test"
|
|
expect(subject.errors).to eq(['expected replacement of "not here" with "test"'])
|
|
end
|
|
end
|
|
end
|