Skip to content

Commit

Permalink
Use double quotes instead of single quotes in Ruby
Browse files Browse the repository at this point in the history
This linter rule is enforced as of
alphagov/govuk-lint#124
  • Loading branch information
quis committed Sep 25, 2019
1 parent bf51e10 commit 64fc08e
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 14 deletions.
2 changes: 1 addition & 1 deletion app/external_doc.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
require 'faraday'
require "faraday"

class ExternalDoc
def self.fetch(repository:)
Expand Down
14 changes: 7 additions & 7 deletions spec/app/client_docs_spec.rb
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
require './app/client_docs'
require "./app/client_docs"

RSpec.describe ClientDocs do
describe '.pages' do
it 'returns a Page for each client' do
describe ".pages" do
it "returns a Page for each client" do
client_pages = ClientDocs.pages

expect(client_pages.count).to eq 6
Expand All @@ -12,11 +12,11 @@
end

RSpec.describe ClientDocs::Page do
describe '#repository' do
it 'returns the repository name for a given client' do
page = ClientDocs::Page.new('ruby')
describe "#repository" do
it "returns the repository name for a given client" do
page = ClientDocs::Page.new("ruby")

expect(page.repository).to eq('alphagov/notifications-ruby-client')
expect(page.repository).to eq("alphagov/notifications-ruby-client")
end
end
end
10 changes: 5 additions & 5 deletions spec/app/external_doc_spec.rb
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
require './app/external_doc'
require "./app/external_doc"

RSpec.describe ExternalDoc do
describe '.fetch' do
let(:repository) { 'alphagov/client-library' }
describe ".fetch" do
let(:repository) { "alphagov/client-library" }

before do
stub_request(:get, "https://raw.githubusercontent.com/#{repository}/master/DOCUMENTATION.md").
to_return(body: File.read('spec/fixtures/markdown.md'))
to_return(body: File.read("spec/fixtures/markdown.md"))
end

it 'returns a GitHub page as a string' do
it "returns a GitHub page as a string" do
page_contents = ExternalDoc.fetch(repository: repository)

expect(page_contents).to be_a(String)
Expand Down
2 changes: 1 addition & 1 deletion spec/spec_helper.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
require 'webmock/rspec'
require "webmock/rspec"

RSpec.configure do |config|
config.before do
Expand Down

0 comments on commit 64fc08e

Please sign in to comment.