summaryrefslogtreecommitdiff
path: root/spec/models
diff options
context:
space:
mode:
authorDouwe Maan <douwe@selenight.nl>2017-02-22 16:39:43 -0600
committerDouwe Maan <douwe@selenight.nl>2017-02-23 09:32:42 -0600
commitbdbc7d967a0c3d95d5e4ea19a2a5be41268d3540 (patch)
tree58899ea2583f1cf5f370f657f584a99d57954c9e /spec/models
parent0beba0251ca5bfbbc0c1a60c5b0b44c972f252cd (diff)
downloadgitlab-ce-bdbc7d967a0c3d95d5e4ea19a2a5be41268d3540.tar.gz
Revert "Enable Style/BarePercentLiterals"
This reverts commit 96bef54154e669f9a3e92c3a4bc76c0be3a52e48.
Diffstat (limited to 'spec/models')
-rw-r--r--spec/models/project_label_spec.rb4
-rw-r--r--spec/models/project_services/bamboo_service_spec.rb4
-rw-r--r--spec/models/project_services/buildkite_service_spec.rb4
-rw-r--r--spec/models/project_services/drone_ci_service_spec.rb4
-rw-r--r--spec/models/project_services/teamcity_service_spec.rb6
5 files changed, 11 insertions, 11 deletions
diff --git a/spec/models/project_label_spec.rb b/spec/models/project_label_spec.rb
index f5596227c81..9cdbfa44e5b 100644
--- a/spec/models/project_label_spec.rb
+++ b/spec/models/project_label_spec.rb
@@ -105,14 +105,14 @@ describe ProjectLabel, models: true do
context 'using name' do
it 'returns cross reference with label name' do
expect(label.to_reference(project, format: :name))
- .to eq %(#{label.project.path_with_namespace}~"#{label.name}")
+ .to eq %Q(#{label.project.path_with_namespace}~"#{label.name}")
end
end
context 'using id' do
it 'returns cross reference with label id' do
expect(label.to_reference(project, format: :id))
- .to eq %(#{label.project.path_with_namespace}~#{label.id})
+ .to eq %Q(#{label.project.path_with_namespace}~#{label.id})
end
end
end
diff --git a/spec/models/project_services/bamboo_service_spec.rb b/spec/models/project_services/bamboo_service_spec.rb
index e30b62ddb61..4014d6129ee 100644
--- a/spec/models/project_services/bamboo_service_spec.rb
+++ b/spec/models/project_services/bamboo_service_spec.rb
@@ -181,7 +181,7 @@ describe BambooService, models: true, caching: true do
end
it 'sets commit status to "pending" when response has no results' do
- stub_request(body: %({"results":{"results":{"size":"0"}}}))
+ stub_request(body: %q({"results":{"results":{"size":"0"}}}))
is_expected.to eq('pending')
end
@@ -223,6 +223,6 @@ describe BambooService, models: true, caching: true do
end
def bamboo_response(result_key: 42, build_state: 'success', size: 1)
- %({"results":{"results":{"size":"#{size}","result":{"buildState":"#{build_state}","planResultKey":{"key":"#{result_key}"}}}}})
+ %Q({"results":{"results":{"size":"#{size}","result":{"buildState":"#{build_state}","planResultKey":{"key":"#{result_key}"}}}}})
end
end
diff --git a/spec/models/project_services/buildkite_service_spec.rb b/spec/models/project_services/buildkite_service_spec.rb
index 59c04c32cf0..05b602d8106 100644
--- a/spec/models/project_services/buildkite_service_spec.rb
+++ b/spec/models/project_services/buildkite_service_spec.rb
@@ -92,7 +92,7 @@ describe BuildkiteService, models: true, caching: true do
end
it 'passes through build status untouched when status is 200' do
- stub_request(body: %({"status":"Great Success"}))
+ stub_request(body: %q({"status":"Great Success"}))
is_expected.to eq('Great Success')
end
@@ -101,7 +101,7 @@ describe BuildkiteService, models: true, caching: true do
end
def stub_request(status: 200, body: nil)
- body ||= %({"status":"success"})
+ body ||= %q({"status":"success"})
buildkite_full_url = 'https://gitlab.buildkite.com/status/secret-sauce-status-token.json?commit=123'
WebMock.stub_request(:get, buildkite_full_url).to_return(
diff --git a/spec/models/project_services/drone_ci_service_spec.rb b/spec/models/project_services/drone_ci_service_spec.rb
index 82d80206afb..47ca802ebc2 100644
--- a/spec/models/project_services/drone_ci_service_spec.rb
+++ b/spec/models/project_services/drone_ci_service_spec.rb
@@ -50,7 +50,7 @@ describe DroneCiService, models: true, caching: true do
end
def stub_request(status: 200, body: nil)
- body ||= %({"status":"success"})
+ body ||= %q({"status":"success"})
WebMock.stub_request(:get, commit_status_path).to_return(
status: status,
@@ -102,7 +102,7 @@ describe DroneCiService, models: true, caching: true do
"success" => "success"
}.each do |drone_status, our_status|
it "sets commit status to #{our_status.inspect} when returned status is #{drone_status.inspect}" do
- stub_request(body: %({"status":"#{drone_status}"}))
+ stub_request(body: %Q({"status":"#{drone_status}"}))
is_expected.to eq(our_status)
end
diff --git a/spec/models/project_services/teamcity_service_spec.rb b/spec/models/project_services/teamcity_service_spec.rb
index 2b76897e4eb..77b18e1c7d0 100644
--- a/spec/models/project_services/teamcity_service_spec.rb
+++ b/spec/models/project_services/teamcity_service_spec.rb
@@ -143,7 +143,7 @@ describe TeamcityService, models: true, caching: true do
end
it 'returns a build URL when teamcity_url has no trailing slash' do
- stub_request(body: %({"build":{"id":"666"}}))
+ stub_request(body: %q({"build":{"id":"666"}}))
is_expected.to eq('http://gitlab.com/teamcity/viewLog.html?buildId=666&buildTypeId=foo')
end
@@ -152,7 +152,7 @@ describe TeamcityService, models: true, caching: true do
let(:teamcity_url) { 'http://gitlab.com/teamcity/' }
it 'returns a build URL' do
- stub_request(body: %({"build":{"id":"666"}}))
+ stub_request(body: %q({"build":{"id":"666"}}))
is_expected.to eq('http://gitlab.com/teamcity/viewLog.html?buildId=666&buildTypeId=foo')
end
@@ -202,7 +202,7 @@ describe TeamcityService, models: true, caching: true do
def stub_request(status: 200, body: nil, build_status: 'success')
teamcity_full_url = 'http://mic:password@gitlab.com/teamcity/httpAuth/app/rest/builds/branch:unspecified:any,number:123'
- body ||= %({"build":{"status":"#{build_status}","id":"666"}})
+ body ||= %Q({"build":{"status":"#{build_status}","id":"666"}})
WebMock.stub_request(:get, teamcity_full_url).to_return(
status: status,