Skip to content

Commit

Permalink
use not_to instead of to_not in specs
Browse files Browse the repository at this point in the history
  • Loading branch information
eliotjordan committed Mar 10, 2016
1 parent 6300868 commit c346fa1
Show file tree
Hide file tree
Showing 12 changed files with 12 additions and 28 deletions.
16 changes: 0 additions & 16 deletions .rubocop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,21 +51,5 @@ RSpec/AnyInstance:
Exclude:
- 'spec/models/concerns/geoblacklight/solr_document_spec.rb'

# Offense count: 12
# Configuration parameters: AcceptedMethod.
RSpec/NotToNot:
Exclude:
- 'spec/controllers/catalog_controller_spec.rb'
- 'spec/features/download_layer_spec.rb'
- 'spec/features/exports_spec.rb'
- 'spec/features/home_page_spec.rb'
- 'spec/features/layer_inspection_spec.rb'
- 'spec/features/metadata_panel_spec.rb'
- 'spec/features/split_view.html.erb_spec.rb'
- 'spec/features/web_services_modal_spec.rb'
- 'spec/lib/geoblacklight/wms_layer/feature_info_response_spec.rb'
- 'spec/lib/geoblacklight/wms_layer_spec.rb'
- 'spec/models/concerns/geoblacklight/solr_document_spec.rb'

Style/SignalException:
EnforcedStyle: semantic
2 changes: 1 addition & 1 deletion spec/controllers/catalog_controller_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
it 'returns a document based off an id' do
get :web_services, id: 'mit-us-ma-e25zcta5dct-2000'
expect(response.status).to eq 200
expect(assigns(:document)).to_not be_nil
expect(assigns(:document)).not_to be_nil
end
end
end
4 changes: 2 additions & 2 deletions spec/features/download_layer_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -48,12 +48,12 @@
scenario 'restricted layer should not have download available to non logged in user' do
visit catalog_path('stanford-cg357zz0321')
expect(page).to have_css 'a', text: 'Login to view and download'
expect(page).to_not have_css 'button', text: 'Download Shapefile'
expect(page).not_to have_css 'button', text: 'Download Shapefile'
end
scenario 'restricted layer should have download available to logged in user' do
sign_in
visit catalog_path('stanford-cg357zz0321')
expect(page).to_not have_css 'a', text: 'Login to view and download'
expect(page).not_to have_css 'a', text: 'Login to view and download'
expect(page).to have_css 'a', text: 'Download Shapefile'
expect(page).to have_css 'button.download-dropdown-toggle'
end
Expand Down
2 changes: 1 addition & 1 deletion spec/features/exports_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
feature 'when restricted or no wfs' do
scenario 'is not in tools' do
visit catalog_path 'princeton-02870w62c'
expect(page).to_not have_css 'li.exports a', text: 'Open in CartoDB'
expect(page).not_to have_css 'li.exports a', text: 'Open in CartoDB'
end
end
end
2 changes: 1 addition & 1 deletion spec/features/home_page_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
visit root_path
end
scenario 'search bar' do
expect(page).to_not have_css '#search-navbar'
expect(page).not_to have_css '#search-navbar'
within '.jumbotron' do
expect(page).to have_css 'h2', text: 'Explore and discover...'
expect(page).to have_css 'h3', text: 'Find the maps and data you need'
Expand Down
2 changes: 1 addition & 1 deletion spec/features/layer_inspection_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@
visit catalog_path('mit-us-ma-e25zcta5dct-2000')
expect(page).to have_css('th', text: 'Attribute')
find('#map').trigger('click')
expect(page).to_not have_css('td.default-text')
expect(page).not_to have_css('td.default-text')
end
end
2 changes: 1 addition & 1 deletion spec/features/metadata_panel_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
feature 'when metadata references are not available' do
scenario 'is not in tools' do
visit catalog_path 'mit-us-ma-e25zcta5dct-2000'
expect(page).to_not have_css 'li.metadata a', text: 'Metadata'
expect(page).not_to have_css 'li.metadata a', text: 'Metadata'
end
end
end
2 changes: 1 addition & 1 deletion spec/features/split_view.html.erb_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@

scenario 'click on a record area to expand collapse' do
within('.documentHeader', match: :first) do
expect(page).to_not have_css('.collapse')
expect(page).not_to have_css('.collapse')
find('.status-icons').trigger('click')
expect(page).to have_css('.collapse', visible: true)
end
Expand Down
2 changes: 1 addition & 1 deletion spec/features/web_services_modal_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
feature 'no wms or wfs provided' do
scenario 'does not show up in tools' do
visit catalog_path 'mit-001145244'
expect(page).to_not have_css 'li.web_services a', text: 'Web services'
expect(page).not_to have_css 'li.web_services a', text: 'Web services'
end
end
end
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@

describe '#format' do
it 'returns a formated response' do
expect(response.format).to_not be_nil
expect(response.format).not_to be_nil
expect(response.format[:values].length).to eq 2
expect(response.format[:values][0]).to eq %w(Header1 value1)
expect(response.format[:values][1]).to eq %w(Header2 value2)
Expand Down
2 changes: 1 addition & 1 deletion spec/lib/geoblacklight/wms_layer_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
describe '#search_params' do
it 'returns all params except URL plus default params' do
expect(wms_layer.search_params.length).to eq 8
expect(wms_layer.search_params).to_not include 'URL' => 'http://www.example.com'
expect(wms_layer.search_params).not_to include 'URL' => 'http://www.example.com'
end
end

Expand Down
2 changes: 1 addition & 1 deletion spec/models/concerns/geoblacklight/solr_document_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@
end
end
it 'returns nil if no direct download' do
expect_any_instance_of(Geoblacklight::Reference).to_not receive(:to_hash)
expect_any_instance_of(Geoblacklight::Reference).not_to receive(:to_hash)
expect(document.direct_download).to be_nil
end
end
Expand Down

0 comments on commit c346fa1

Please sign in to comment.