Skip to content

Commit 0066639

Browse files
committed
Either test the defaults or ignore them
Mutant likes to remind that setting defaults is ineffective, when we override them in tests. This points out false sense of security: we cannot rely on the code we didn't test and have released. Resolution is to test with initializer default. If we had another serializer with specified behaviour, then it would make sense to pass it explicitly in tests.
1 parent 52968ab commit 0066639

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

ruby_event_store/spec/mappers/transformation/encryption_spec.rb

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,7 @@ module Transformation
4646
RSpec.describe Encryption do
4747
let(:time) { Time.now.utc }
4848
let(:key_repository) { InMemoryEncryptionKeyRepository.new }
49-
let(:serializer) { Serializers::YAML }
50-
let(:mapper) { Encryption.new(key_repository, serializer: serializer) }
49+
let(:mapper) { Encryption.new(key_repository) }
5150
let(:sender_id) { SecureRandom.uuid }
5251
let(:recipient_id) { SecureRandom.uuid }
5352
let(:owner_id) { SecureRandom.uuid }

0 commit comments

Comments
 (0)