Commit e1b8b932 authored by Vitali Tatarintev's avatar Vitali Tatarintev

Replace double quotes with single quotes

parent d40b7ea3
......@@ -26,7 +26,7 @@ module RuboCop
class BeSuccessMatcher < RuboCop::Cop::Cop
include SpecHelpers
MESSAGE = "Don't use deprecated `success?` method, use `successful?` instead.".freeze
MESSAGE = 'Do not use deprecated `success?` method, use `successful?` instead.'.freeze
def_node_search :expect_to_be_success?, <<~PATTERN
(send (send nil? :expect (send nil? ...)) :to (send nil? :be_success))
......@@ -49,7 +49,7 @@ module RuboCop
def autocorrect(node)
lambda do |corrector|
corrector.insert_after(node.loc.expression, "ful")
corrector.insert_after(node.loc.expression, 'ful')
end
end
end
......
......@@ -42,17 +42,17 @@ describe RuboCop::Cop::RSpec::BeSuccessMatcher do
allow(cop).to receive(:in_controller_spec?).and_return(true)
end
context "using expect(response).to be_success call" do
context 'using expect(response).to be_success call' do
it_behaves_like 'an offensive be_success call', OFFENSE_CALL_EXPECT_TO_BE_SUCCESS
it_behaves_like 'an autocorrected be_success call', OFFENSE_CALL_EXPECT_TO_BE_SUCCESS, CALL_EXPECT_TO_BE_SUCCESSFUL
end
context "using is_expected.to be_success call" do
context 'using is_expected.to be_success call' do
it_behaves_like 'an offensive be_success call', OFFENSE_CALL_IS_EXPECTED_TO_BE_SUCCESS
it_behaves_like 'an autocorrected be_success call', OFFENSE_CALL_IS_EXPECTED_TO_BE_SUCCESS, CALL_IS_EXPECTED_TO_BE_SUCCESSFUL
end
context "using expect(response).to be_successful" do
context 'using expect(response).to be_successful' do
it "does not register an offense" do
inspect_source(CALL_EXPECT_TO_BE_SUCCESSFUL)
......@@ -60,8 +60,8 @@ describe RuboCop::Cop::RSpec::BeSuccessMatcher do
end
end
context "using is_expected.to be_successful" do
it "does not register an offense" do
context 'using is_expected.to be_successful' do
it 'does not register an offense' do
inspect_source(CALL_IS_EXPECTED_TO_BE_SUCCESSFUL)
expect(cop.offenses.size).to eq(0)
......@@ -70,16 +70,16 @@ describe RuboCop::Cop::RSpec::BeSuccessMatcher do
end
context 'outside of a controller spec file' do
context "using expect(response).to be_success call" do
it "does not register an offense" do
context 'using expect(response).to be_success call' do
it 'does not register an offense' do
inspect_source(OFFENSE_CALL_EXPECT_TO_BE_SUCCESS)
expect(cop.offenses.size).to eq(0)
end
end
context "using is_expected.to be_success call" do
it "does not register an offense" do
context 'using is_expected.to be_success call' do
it 'does not register an offense' do
inspect_source(OFFENSE_CALL_IS_EXPECTED_TO_BE_SUCCESS)
expect(cop.offenses.size).to eq(0)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment