Skip to content

Commit

Permalink
Update string array quotation style
Browse files Browse the repository at this point in the history
  • Loading branch information
ngs committed Apr 8, 2017
1 parent 01ce2b4 commit 32b3dc9
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 13 deletions.
2 changes: 1 addition & 1 deletion Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ end

require 'rake/clean'

task test: %w(rubocop spec cucumber)
task test: %w[rubocop spec cucumber]

begin
require 'cane/rake_task'
Expand Down
1 change: 1 addition & 0 deletions middleman-blog-similar.gemspec
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# -*- encoding: utf-8 -*-

$LOAD_PATH.push File.expand_path('../lib', __FILE__)
require 'middleman-blog-similar/version'

Expand Down
16 changes: 8 additions & 8 deletions spec/middleman-blog-similar/extension_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,10 @@
describe 'results' do
subject { resource.similar_articles.map { |a| [a.page_id, a.data.category || '<none>'].concat a.tags } }
it { is_expected.to have(4).items }
its([0]) { is_expected.to eq %w(2014-05-14-article6 <none> dog Brown cat) }
its([1]) { is_expected.to eq %w(2014-05-12-article4 <none> dog cat fox) }
its([2]) { is_expected.to eq %w(2014-05-09-article1 test dog cat) }
its([3]) { is_expected.to eq %w(2014-05-13-article5 <none> dog) }
its([0]) { is_expected.to eq %w[2014-05-14-article6 <none> dog Brown cat] }
its([1]) { is_expected.to eq %w[2014-05-12-article4 <none> dog cat fox] }
its([2]) { is_expected.to eq %w[2014-05-09-article1 test dog cat] }
its([3]) { is_expected.to eq %w[2014-05-13-article5 <none> dog] }
context 'when configured with weight map' do
before :all do
@app = middleman_app('test-app') do
Expand All @@ -38,10 +38,10 @@
end
end
it { is_expected.to have(4).items }
its([0]) { is_expected.to eq %w(2014-05-09-article1 test dog cat) }
its([1]) { is_expected.to eq %w(2014-05-14-article6 <none> dog Brown cat) }
its([2]) { is_expected.to eq %w(2014-05-12-article4 <none> dog cat fox) }
its([3]) { is_expected.to eq %w(2014-05-13-article5 <none> dog) }
its([0]) { is_expected.to eq %w[2014-05-09-article1 test dog cat] }
its([1]) { is_expected.to eq %w[2014-05-14-article6 <none> dog Brown cat] }
its([2]) { is_expected.to eq %w[2014-05-12-article4 <none> dog cat fox] }
its([3]) { is_expected.to eq %w[2014-05-13-article5 <none> dog] }
end
end
end
8 changes: 4 additions & 4 deletions spec/middleman-blog-similar/tagger_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,18 +7,18 @@
let(:page_id) { '2014-05-08-article0' }
subject { described_class.new.call resource }
describe ::Middleman::Blog::Similar::Tagger::Tags do
it { is_expected.to eq %w(dog cat brown) }
it { is_expected.to eq %w[dog cat brown] }
end
describe ::Middleman::Blog::Similar::Tagger::Mecab do
let(:page_id) { '2014-05-11-article3' }
it { is_expected.to eq %w(叫び 悪口 教師 西洋 時分 坊ちゃん 国家 この世 人間 国家 ) }
it { is_expected.to eq %w[叫び 悪口 教師 西洋 時分 坊ちゃん 国家 この世 人間 国家 ] }
context 'written in English' do
let(:page_id) { '2014-05-10-article2' }
it { is_expected.to eq %w(quick brown fox jumps over the lazy dog dog dog) }
it { is_expected.to eq %w[quick brown fox jumps over the lazy dog dog dog] }
end
end
describe ::Middleman::Blog::Similar::Tagger::Entagger do
let(:page_id) { '2014-05-10-article2' }
it { is_expected.to eq %w(fox jumps dog) }
it { is_expected.to eq %w[fox jumps dog] }
end
end

0 comments on commit 32b3dc9

Please sign in to comment.