Restoring anonymous resource declaration in specs
Restoring anonymous resource declaration in specs

At issue is "human_readable_type" leverages the resource's model name,
which, by default, uses ActiveModel::Name.  By adding `.model_name` that
returns an instance of ActiveModel::Name, the tests now pass.

I could imagine adding a spec helper method for generating an anonymous
resource.  This method would encapsulate the behavior.  If we were to go
this route, we'd want to update all of our existing `Class.new` declarations.

```ruby
module Hyrax::SpecSupport
  def self.build_anonymous_resource_class(klass, name: "Anonymous", &block)
     Class.new(klass) do
       def self.model_name
         ActiveModel::Name.new(self, nil, name)
       end
       instance_exec(&block)
     end
  end
end

Hyrax::SpecSupport.build_anonymous_resource_class(Hyrax::Work, name: "Anonymouse") do
  include Hyrax::Schema(:basic_metadata)
end
```

samvera/hyrax,samvera/hyrax,samvera/hyrax,samvera/hyrax