In reviewing these failing specs, it is testing the behavior of a
presenter by way of fiddling with the internals of a controller.
Further, these tested controllers are not in the knapsack.
So ✂✂✂ goes the code. This spec has been in Hyku for 7 years
and it's time to not bring them into the knapsack.
Spec to get working
```ruby
RSpec.describe Hyrax::GenericWorksController do
describe "#presenter" do
subject { controller.send :presenter }
let(:solr_document) { SolrDocument.new(FactoryBot.create(:generic_work).to_solr) }
before do
allow(controller).to receive(:search_result_document).and_return(solr_document)
end
it "initializes a presenter" do
expect(subject).to be_kind_of Hyku::WorkShowPresenter
expect(subject.manifest_url).to eq "http://test.host/concern/generic_works/#{solr_document.to_param}/manifest"
end
end
end
```
In reviewing these failing specs, it is testing the behavior of a presenter by way of fiddling with the internals of a controller. Further, these tested controllers are not in the knapsack.
So ✂✂✂ goes the code. This spec has been in Hyku for 7 years and it's time to not bring them into the knapsack.
Spec to get working
```ruby RSpec.describe Hyrax::GenericWorksController do describe "#presenter" do subject { controller.send :presenter } let(:solr_document) { SolrDocument.new(FactoryBot.create(:generic_work).to_solr) } before do allow(controller).to receive(:search_result_document).and_return(solr_document) end it "initializes a presenter" do expect(subject).to be_kind_of Hyku::WorkShowPresenter expect(subject.manifest_url).to eq "http://test.host/concern/generic_works/#{solr_document.to_param}/manifest" end end end ```🧹 Appease the coppers
96460aa25ec3699e2d8bde72097a0eaae7d079f0