From e911faa29b33b1e129fcd881b68a73abc63dadbd Mon Sep 17 00:00:00 2001 From: Justin Coyne Date: Mon, 29 Apr 2019 12:05:41 -0500 Subject: [PATCH] Rename a spec all specs must end in *_spec.rb --- .rubocop_todo.yml | 6 +++--- .../{metadata_refresh.rb => metadata_refresh_spec.rb} | 2 +- spec/services/refresh_metadata_action_spec.rb | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) rename spec/requests/{metadata_refresh.rb => metadata_refresh_spec.rb} (91%) diff --git a/.rubocop_todo.yml b/.rubocop_todo.yml index 598d35d37e..7765abda24 100644 --- a/.rubocop_todo.yml +++ b/.rubocop_todo.yml @@ -1,6 +1,6 @@ # This configuration was generated by # `rubocop --auto-gen-config` -# on 2019-04-30 16:12:14 -0500 using RuboCop version 0.65.0. +# on 2019-05-01 10:00:16 -0500 using RuboCop version 0.65.0. # The point is for the user to remove these configuration records # one by one as the offenses are removed from the code base. # Note that changes in the inspected code, or installation of new @@ -117,7 +117,7 @@ RSpec/ContextWording: RSpec/DescribeClass: Exclude: - 'spec/requests/about_spec.rb' - - 'spec/requests/metadata_refresh.rb' + - 'spec/requests/metadata_refresh_spec.rb' - 'spec/requests/metadata_spec.rb' # Offense count: 32 @@ -191,7 +191,7 @@ RSpec/MessageSpies: - 'spec/services/registration_service_spec.rb' - 'spec/services/version_service_spec.rb' -# Offense count: 77 +# Offense count: 78 # Configuration parameters: AggregateFailuresByDefault. RSpec/MultipleExpectations: Max: 8 diff --git a/spec/requests/metadata_refresh.rb b/spec/requests/metadata_refresh_spec.rb similarity index 91% rename from spec/requests/metadata_refresh.rb rename to spec/requests/metadata_refresh_spec.rb index 987f860d95..cf1a67a735 100644 --- a/spec/requests/metadata_refresh.rb +++ b/spec/requests/metadata_refresh_spec.rb @@ -10,7 +10,7 @@ before do allow(Dor).to receive(:find).and_return(object) - allow(RefreshMetadataAction).to receive(:run) + allow(RefreshMetadataAction).to receive(:run).and_return('') allow(object).to receive(:save) end diff --git a/spec/services/refresh_metadata_action_spec.rb b/spec/services/refresh_metadata_action_spec.rb index 853c99b18d..c8c978772f 100644 --- a/spec/services/refresh_metadata_action_spec.rb +++ b/spec/services/refresh_metadata_action_spec.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -require 'spec_helper' +require 'rails_helper' RSpec.describe RefreshMetadataAction do subject(:refresh) { described_class.run(item) } @@ -13,7 +13,7 @@ end it 'gets the data an puts it in descMetadata' do - refresh + expect(refresh).not_to be_nil expect(item.descMetadata.content).to eq '' end end