diff --git a/.rubocop_todo.yml b/.rubocop_todo.yml index b931ca3bb4..3d57f0c836 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-26 16:20:32 -0500 using RuboCop version 0.65.0. +# on 2019-04-29 12:12:12 -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' # Offense count: 32 # Cop supports --auto-correct. 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