Skip to content

Commit

Permalink
Disable RSpec monkeypatching
Browse files Browse the repository at this point in the history
  • Loading branch information
jcoyne committed Apr 24, 2017
1 parent 078d278 commit 714d3b6
Show file tree
Hide file tree
Showing 98 changed files with 99 additions and 97 deletions.
2 changes: 1 addition & 1 deletion spec/controllers/alternate_controller_spec.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# frozen_string_literal: true

describe AlternateController do
RSpec.describe AlternateController do
describe "the search results tools" do
it "inherits tools from CatalogController" do
expect(AlternateController.blacklight_config.index.document_actions).to have_key(:bookmark)
Expand Down
2 changes: 1 addition & 1 deletion spec/controllers/application_controller_spec.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# frozen_string_literal: true

describe ApplicationController do
RSpec.describe ApplicationController do

describe "#blacklight_config" do

Expand Down
2 changes: 1 addition & 1 deletion spec/controllers/blacklight/base_spec.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# frozen_string_literal: true

describe Blacklight::Base do
RSpec.describe Blacklight::Base do
let(:controller) { (Class.new(ApplicationController) { include Blacklight::Base }).new }
subject { controller}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# frozen_string_literal: true

describe Blacklight::DefaultComponentConfiguration do
RSpec.describe Blacklight::DefaultComponentConfiguration do
subject do
Class.new do
include Blacklight::Configurable
Expand Down
2 changes: 1 addition & 1 deletion spec/controllers/blacklight/facet_spec.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# frozen_string_literal: true

describe Blacklight::Facet do
RSpec.describe Blacklight::Facet do
subject do
Class.new do
include Blacklight::Facet
Expand Down
2 changes: 1 addition & 1 deletion spec/controllers/blacklight/search_fields_spec.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# frozen_string_literal: true

describe Blacklight::SearchFields do
RSpec.describe Blacklight::SearchFields do

class MockConfig
include Blacklight::SearchFields
Expand Down
2 changes: 1 addition & 1 deletion spec/controllers/bookmarks_controller_spec.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# frozen_string_literal: true

describe BookmarksController do
RSpec.describe BookmarksController do
describe '#blacklight_config' do
it 'uses POST requests for querying solr' do
expect(@controller.blacklight_config.http_method).to eq :post
Expand Down
2 changes: 1 addition & 1 deletion spec/controllers/catalog_controller_spec.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# frozen_string_literal: true
describe CatalogController do
RSpec.describe CatalogController do
let(:doc_id) { '2007020969' }
let(:mock_response) { instance_double(Blacklight::Solr::Response) }
let(:mock_document) { instance_double(SolrDocument) }
Expand Down
2 changes: 1 addition & 1 deletion spec/controllers/saved_searches_controller_spec.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# frozen_string_literal: true

describe SavedSearchesController do
RSpec.describe SavedSearchesController do
routes { Blacklight::Engine.routes }

before(:all) do
Expand Down
2 changes: 1 addition & 1 deletion spec/controllers/search_history_controller_spec.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# frozen_string_literal: true

describe SearchHistoryController do
RSpec.describe SearchHistoryController do
routes { Blacklight::Engine.routes }

describe "index" do
Expand Down
2 changes: 1 addition & 1 deletion spec/features/alternate_controller_spec.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# frozen_string_literal: true

describe "Alternate Controller Behaviors" do
RSpec.describe "Alternate Controller Behaviors" do
it "has the correct per-page form" do
visit search_alternate_path
expect(page).to have_selector("form[action='#{search_alternate_url}']")
Expand Down
2 changes: 1 addition & 1 deletion spec/features/autocomplete_spec.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
describe 'Autocomplete suggestions' do
RSpec.describe 'Autocomplete suggestions' do
it 'search form has suggest path' do
visit root_path
expect(page).to have_css 'input[data-autocomplete-path="/catalog/suggest"]'
Expand Down
2 changes: 1 addition & 1 deletion spec/features/bookmarks_spec.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# frozen_string_literal: true

describe "Bookmarks" do
RSpec.describe "Bookmarks" do
describe "navigating from the homepage" do
it "has a link to the history page" do
sign_in 'user1'
Expand Down
2 changes: 1 addition & 1 deletion spec/features/did_you_mean_spec.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# frozen_string_literal: true

describe "Did You Mean" do
RSpec.describe "Did You Mean" do
before { visit root_path }

describe "searching all fields" do
Expand Down
2 changes: 1 addition & 1 deletion spec/features/facets_spec.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# frozen_string_literal: true

describe "Facets" do
RSpec.describe "Facets" do
it "shows a single facet's values" do
visit facet_catalog_path("language_facet")
expect(page).to have_selector ".modal-title", :text => "Language"
Expand Down
2 changes: 1 addition & 1 deletion spec/features/record_view_spec.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# frozen_string_literal: true

describe "Record View" do
RSpec.describe "Record View" do
it "displays a normal record" do
visit solr_document_path('2007020969')
expect(page).to have_content "Title:"
Expand Down
2 changes: 1 addition & 1 deletion spec/features/saved_searches_spec.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# frozen_string_literal: true

describe "Saved Searches" do
RSpec.describe "Saved Searches" do
before do
sign_in 'user1'
visit root_path
Expand Down
2 changes: 1 addition & 1 deletion spec/features/search_context_spec.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# frozen_string_literal: true

describe "Search Results context", js: true do
RSpec.describe "Search Results context", js: true do
it "passes the current search id through" do
search_for ''
search_id = Search.last.id.to_s
Expand Down
2 changes: 1 addition & 1 deletion spec/features/search_filters_spec.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# frozen_string_literal: true

describe "Facets" do
RSpec.describe "Facets" do
it "works without a search term" do
visit root_path
within "#facet-language_facet" do
Expand Down
2 changes: 1 addition & 1 deletion spec/features/search_formats_spec.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# frozen_string_literal: true

describe "Search Formats" do
RSpec.describe "Search Formats" do
it "has an RSS XML response" do
visit "/catalog.rss?q="
expect(page).to have_content "Blacklight Search Results"
Expand Down
2 changes: 1 addition & 1 deletion spec/features/search_history_spec.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# frozen_string_literal: true

describe "Search History Page" do
RSpec.describe "Search History Page" do
describe "navigating from the homepage" do
it "has a link to the history page" do
visit root_path
Expand Down
2 changes: 1 addition & 1 deletion spec/features/search_pagination_spec.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# frozen_string_literal: true

describe "Search Pagination" do
RSpec.describe "Search Pagination" do
it "has results with pagination" do
visit root_path
fill_in "q", with: ''
Expand Down
2 changes: 1 addition & 1 deletion spec/features/search_results_spec.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# frozen_string_literal: true

describe "Search Results" do
RSpec.describe "Search Results" do
it "has for an empty query" do
search_for ''
expect(number_of_results_from_page(page)).to eq 30
Expand Down
2 changes: 1 addition & 1 deletion spec/features/search_sort_spec.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# frozen_string_literal: true

describe "Search Sort" do
RSpec.describe "Search Sort" do
it "sorts on facet results with no search terms" do
visit root_path
within "#facet-language_facet" do
Expand Down
2 changes: 1 addition & 1 deletion spec/features/search_spec.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# frozen_string_literal: true

describe "Search Page" do
RSpec.describe "Search Page" do
it "shows welcome" do
visit root_path
expect(page).to have_selector("input#q")
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# frozen_string_literal: true

describe Blacklight::ConfigurationHelperBehavior do
RSpec.describe Blacklight::ConfigurationHelperBehavior do
let(:blacklight_config) { Blacklight::Configuration.new }
let(:config_value) { double() }

Expand Down
2 changes: 1 addition & 1 deletion spec/helpers/blacklight/facets_helper_behavior_spec.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# frozen_string_literal: true

describe Blacklight::FacetsHelperBehavior do
RSpec.describe Blacklight::FacetsHelperBehavior do
let(:blacklight_config) { Blacklight::Configuration.new }

before(:each) do
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# frozen_string_literal: true

describe Blacklight::HashAsHiddenFieldsHelperBehavior do
RSpec.describe Blacklight::HashAsHiddenFieldsHelperBehavior do
before(:each) do
@hash = {:q => "query", :search_field => "search_field", :per_page=>10, :page=>5, :extra_arbitrary_key=>"arbitrary_value", :f=> {:field1 => ["a", "b"], :field2=> ["z"]}}
end
Expand Down
2 changes: 1 addition & 1 deletion spec/helpers/blacklight/layout_helper_behavior_spec.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# frozen_string_literal: true

describe Blacklight::LayoutHelperBehavior do
RSpec.describe Blacklight::LayoutHelperBehavior do
describe '#show_content_classes' do
it 'returns a string of classes' do
expect(helper.show_content_classes).to be_an String
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# frozen_string_literal: true

describe Blacklight::RenderConstraintsHelperBehavior do
RSpec.describe Blacklight::RenderConstraintsHelperBehavior do
let(:config) do
Blacklight::Configuration.new do |config|
config.add_facet_field 'type'
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
describe Blacklight::RenderPartialsHelperBehavior do
RSpec.describe Blacklight::RenderPartialsHelperBehavior do
describe "#type_field_to_partial_name" do
let(:document) { double }
context "with default value" do
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# frozen_string_literal: true

describe Blacklight::SearchHistoryConstraintsHelperBehavior do
RSpec.describe Blacklight::SearchHistoryConstraintsHelperBehavior do

before(:all) do
@config = Blacklight::Configuration.new do |config|
Expand Down
2 changes: 1 addition & 1 deletion spec/helpers/blacklight/suggest_helper_behavior_spec.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# frozen_string_literal: true

describe Blacklight::SuggestHelperBehavior do
RSpec.describe Blacklight::SuggestHelperBehavior do
before do
allow(helper).to receive(:blacklight_config).and_return(blacklight_config)
end
Expand Down
2 changes: 1 addition & 1 deletion spec/helpers/blacklight/url_helper_behavior_spec.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# frozen_string_literal: true

describe Blacklight::UrlHelperBehavior do
RSpec.describe Blacklight::UrlHelperBehavior do

let(:blacklight_config) do
Blacklight::Configuration.new.configure do |config|
Expand Down
2 changes: 1 addition & 1 deletion spec/helpers/blacklight_helper_spec.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# frozen_string_literal: true
describe BlacklightHelper do
RSpec.describe BlacklightHelper do
before(:each) do
allow(helper).to receive(:current_or_guest_user).and_return(User.new)
allow(helper).to receive(:search_action_path) do |*args|
Expand Down
2 changes: 1 addition & 1 deletion spec/helpers/catalog_helper_spec.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# frozen_string_literal: true

describe CatalogHelper do
RSpec.describe CatalogHelper do
include ERB::Util
include CatalogHelper

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
require 'spec_helper'
require 'generators/blacklight/solr5_generator'

describe Blacklight::Solr5Generator do
RSpec.describe Blacklight::Solr5Generator do
let(:destination) { Dir.mktmpdir }

describe "#solr_wrapper_config" do
Expand Down
2 changes: 1 addition & 1 deletion spec/lib/blacklight/configuration/field_spec.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
describe Blacklight::Configuration::Field do
RSpec.describe Blacklight::Configuration::Field do
subject { described_class.new(key: key, label: label) }
let(:key) { 'some_key' }
let(:label) { 'some label' }
Expand Down
2 changes: 1 addition & 1 deletion spec/lib/blacklight/parameters_spec.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# frozen_string_literal: true

describe Blacklight::Parameters do
RSpec.describe Blacklight::Parameters do
describe "sanitize_search_params" do
subject { described_class.sanitize(params) }

Expand Down
2 changes: 1 addition & 1 deletion spec/lib/blacklight/search_state_spec.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# frozen_string_literal: true

describe Blacklight::SearchState do
RSpec.describe Blacklight::SearchState do
let(:blacklight_config) do
Blacklight::Configuration.new.configure do |config|
config.index.title_field = 'title_display'
Expand Down
2 changes: 1 addition & 1 deletion spec/lib/blacklight/utils_spec.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# frozen_string_literal: true

describe 'Blacklight::Utils' do
RSpec.describe 'Blacklight::Utils' do
describe Blacklight::OpenStructWithHashAccess do
it "provides hash-like accessors for OpenStruct data" do
a = Blacklight::OpenStructWithHashAccess.new :foo => :bar, :baz => 1
Expand Down
2 changes: 1 addition & 1 deletion spec/lib/blacklight_spec.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# frozen_string_literal: true

describe Blacklight do
RSpec.describe Blacklight do
context 'root' do
let(:blroot) { File.expand_path(File.join(__FILE__, '..', '..', '..' )) }

Expand Down
2 changes: 1 addition & 1 deletion spec/lib/tasks/blacklight_task_spec.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# frozen_string_literal: true
require 'rake'

describe "blacklight:delete_old_searches" do
RSpec.describe "blacklight:delete_old_searches" do

before do
@rake = Rake::Application.new
Expand Down
2 changes: 1 addition & 1 deletion spec/models/blacklight/configurable_spec.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# frozen_string_literal: true

describe "Blacklight::Configurable" do
RSpec.describe "Blacklight::Configurable" do

describe "inheritence" do
before(:all) do
Expand Down
2 changes: 1 addition & 1 deletion spec/models/blacklight/configuration/context_spec.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# frozen_string_literal: true

describe Blacklight::Configuration::Context do
RSpec.describe Blacklight::Configuration::Context do

subject { described_class.new(context) }
let(:context) { double }
Expand Down
2 changes: 1 addition & 1 deletion spec/models/blacklight/configuration_spec.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# frozen_string_literal: true

describe "Blacklight::Configuration" do
RSpec.describe "Blacklight::Configuration" do

before(:each) do
@config = Blacklight::Configuration.new
Expand Down
2 changes: 1 addition & 1 deletion spec/models/blacklight/document/active_model_shim_spec.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# frozen_string_literal: true

describe 'Blacklight::Document::ActiveModelShim' do
RSpec.describe 'Blacklight::Document::ActiveModelShim' do

class MockDocument
include Blacklight::Document
Expand Down
2 changes: 1 addition & 1 deletion spec/models/blacklight/document/cache_key_spec.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# frozen_string_literal: true

describe Blacklight::Document::CacheKey do
RSpec.describe Blacklight::Document::CacheKey do
let(:attributes) { {} }
let(:subject) { SolrDocument.new(attributes) }
it 'SolrDocument includes the module' do
Expand Down
2 changes: 1 addition & 1 deletion spec/models/blacklight/document/dublin_core_spec.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# frozen_string_literal: true

describe "Blacklight::Document::DublinCore" do
RSpec.describe "Blacklight::Document::DublinCore" do
before(:all) do
@mock_class = Class.new do
include Blacklight::Document
Expand Down
2 changes: 1 addition & 1 deletion spec/models/blacklight/document/email_spec.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# frozen_string_literal: true

describe "Blacklight::Document::Email" do
RSpec.describe "Blacklight::Document::Email" do
before(:all) do
SolrDocument.use_extension( Blacklight::Document::Email )
end
Expand Down
Loading

0 comments on commit 714d3b6

Please sign in to comment.