diff --git a/.rubocop_todo.yml b/.rubocop_todo.yml index 23160d6a7..326953bec 100644 --- a/.rubocop_todo.yml +++ b/.rubocop_todo.yml @@ -515,14 +515,6 @@ Style/RescueStandardError: - "lib/blacklight/configuration/fields.rb" - "lib/railties/blacklight.rake" -# Offense count: 6 -# This cop supports safe autocorrection (--autocorrect). -# Configuration parameters: AllowAsExpressionSeparator. -Style/Semicolon: - Exclude: - - "spec/models/blacklight/solr/repository_spec.rb" - - "spec/views/catalog/_paginate_compact.html.erb_spec.rb" - # Offense count: 32 # This cop supports safe autocorrection (--autocorrect). # Configuration parameters: MinSize. diff --git a/spec/models/blacklight/solr/repository_spec.rb b/spec/models/blacklight/solr/repository_spec.rb index ad4056efa..2f73486e8 100644 --- a/spec/models/blacklight/solr/repository_spec.rb +++ b/spec/models/blacklight/solr/repository_spec.rb @@ -160,7 +160,11 @@ end describe "setting to post" do - let (:blacklight_config) { config = Blacklight::Configuration.new; config.http_method = :post; config } + let (:blacklight_config) do + config = Blacklight::Configuration.new + config.http_method = :post + config + end it "keep value set to post" do expect(blacklight_config.http_method).to eq :post @@ -210,7 +214,11 @@ end describe "http_method configuration", :integration do - let (:blacklight_config) { config = Blacklight::Configuration.new; config.http_method = :post; config } + let (:blacklight_config) do + config = Blacklight::Configuration.new + config.http_method = :post + config + end it "sends a post request to solr and get a response back" do response = subject.search(params: { q: all_docs_query }) diff --git a/spec/views/catalog/_paginate_compact.html.erb_spec.rb b/spec/views/catalog/_paginate_compact.html.erb_spec.rb index f2da4c50a..c716b07d3 100644 --- a/spec/views/catalog/_paginate_compact.html.erb_spec.rb +++ b/spec/views/catalog/_paginate_compact.html.erb_spec.rb @@ -16,7 +16,7 @@ end it "renders ActiveRecord collections" do - 50.times { b = Bookmark.new; b.user = user; b.save! } + 50.times { Bookmark.create!(user: user) } render partial: 'catalog/paginate_compact', object: Bookmark.page(1).per(25) expect(rendered).to have_css ".page-entries" expect(rendered).to have_css "a[@rel=next]"