Manually fix RuboCop RSpec autofix failures.

This commit is contained in:
Mike McQuaid 2018-09-20 13:40:38 +01:00
parent 79c2ccd0bc
commit 359fb27cfe
No known key found for this signature in database
GPG Key ID: 48A898132FD8EE70
3 changed files with 9 additions and 9 deletions

View File

@ -126,7 +126,7 @@ describe CacheStoreDatabase do
context "`File.exist?(cache_path)` returns `true`" do
before do
allow(File).to receive(:exist?).with(cache_path).and_return(true)
allow(cache_path).to receive(:exist?).and_return(true)
end
it "returns `true`" do
@ -136,7 +136,7 @@ describe CacheStoreDatabase do
context "`File.exist?(cache_path)` returns `false`" do
before do
allow(File).to receive(:exist?).with(cache_path).and_return(false)
allow(cache_path).to receive(:exist?).and_return(false)
end
it "returns `false`" do

View File

@ -44,7 +44,7 @@ describe ErrorDuringExecution do
end
its(:to_s) {
expect(subject).to eq <<~EOS
expect(subject.to_s).to eq <<~EOS
Failure while executing; `false` exited with 1. Here's the output:
This still worked.
#{Formatter.error("Here something went wrong.\n")}
@ -56,8 +56,8 @@ describe ErrorDuringExecution do
let(:command) { ["env", "PATH=/bin", "cat", "with spaces"] }
its(:to_s) {
expect(subject)
.to eq 'Failure while executing; `env PATH=/bin cat with\ spaces` exited with 1.'
expect(subject.to_s)
.to eq 'Failure while executing; `env PATH=/bin cat with\ spaces` exited with 1.'
}
end
end

View File

@ -16,7 +16,7 @@ describe FormulaValidationError do
subject { described_class.new("foo", "sha257", "magic") }
its(:to_s) {
expect(subject).to eq(%q(invalid attribute for formula 'foo': sha257 ("magic")))
expect(subject.to_s).to eq(%q(invalid attribute for formula 'foo': sha257 ("magic")))
}
end
@ -49,7 +49,7 @@ describe FormulaUnavailableError do
end
its(:to_s) {
expect(subject).to eq('No available formula with the name "foo" (dependency of foobar)')
expect(subject.to_s).to eq('No available formula with the name "foo" (dependency of foobar)')
}
end
end
@ -76,7 +76,7 @@ describe FormulaClassUnavailableError do
let(:list) { [] }
its(:to_s) {
expect(subject).to match(/Expected to find class Foo, but found no classes\./)
expect(subject.to_s).to match(/Expected to find class Foo, but found no classes\./)
}
end
@ -84,7 +84,7 @@ describe FormulaClassUnavailableError do
let(:list) { [mod.const_get(:Bar)] }
its(:to_s) {
expect(subject).to match(/Expected to find class Foo, but only found: Bar \(not derived from Formula!\)\./)
expect(subject.to_s).to match(/Expected to find class Foo, but only found: Bar \(not derived from Formula!\)\./)
}
end