-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
spec/unit_tests/moab: remove cruft (inspired by rubocop) #32
Conversation
77c5ddd
to
f27e0df
Compare
f27e0df
to
8822b9a
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
two or three small nitpicks, but looks great overall. definitely an improvement in readability and maintainability, AFAICT.
end | ||
|
||
describe '=========================== INSTANCE ATTRIBUTES ===========================' do | ||
context '#datetime' do | ||
let(:version_metadata_event) { Moab::VersionMetadataEvent.new([]) } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
probably doesn't make a practical difference since it's empty anyway, but seems like this should use Moab::VersionMetadataEvent.new({})
, since the constructor wants a hash?
it 'populated options hash' do | ||
opts = { | ||
digital_object_id: 'Test digital_object_id', | ||
versions: double(Moab::VersionMetadataEntry.name) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
seems like this should be a list, like it was previously? e.g. versions: [double(Moab::VersionMetadataEntry.name)]
context '#versions' do | ||
it 'empty Array if value not set' do | ||
expect(version_metadata.versions).to be_kind_of Array | ||
expect(version_metadata.versions.size).to eq 0 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this seems duplicative of lines 13-17? if so, i'd be inclined to remove one or the other, though no preference on my part as to which one.
8822b9a
to
8f16289
Compare
60bde22
to
8f16289
Compare
8f16289
to
a973abc
Compare
Please review especially for:
This spec cleanup:
etc.
Connected to #6