spec/models/hyrax/work_behavior_spec.rb in hyrax-1.1.1 vs spec/models/hyrax/work_behavior_spec.rb in hyrax-2.0.0.beta1
- old
+ new
@@ -1,8 +1,6 @@
-require 'spec_helper'
-
-describe Hyrax::WorkBehavior do
+RSpec.describe Hyrax::WorkBehavior do
before do
class EssentialWork < ActiveFedora::Base
include Hyrax::WorkBehavior
end
end
@@ -22,11 +20,11 @@
Solrizer::Common,
Hyrax::Suppressible)
end
describe '#to_s' do
it 'uses the provided titles' do
- subject.title = %w(Hello World)
+ subject.title = %w[Hello World]
expect(subject.to_s).to include 'Hello'
expect(subject.to_s).to include 'World'
end
end
@@ -45,11 +43,12 @@
expect(subject.to_solr.keys).to include('has_model_ssim')
end
describe 'indexer' do
let(:klass) { Class.new }
+
it 'is settable' do
EssentialWork.indexer = klass
- expect(subject.indexer).to eq klass
+ expect(EssentialWork.indexer).to eq klass
end
end
end