Skip to content

Commit

Permalink
fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
martinschaflitzl1 committed Dec 21, 2023
1 parent 1c7d213 commit 7e43b25
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions lib/active_type/util/unmutable_attributes.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ module Util
class UnmutableAttributes

attr_reader :original_attributes
delegate :to_hash, to: :original_attributes

def initialize(attributes)
@original_attributes = attributes
Expand Down
2 changes: 1 addition & 1 deletion spec/active_type/util_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -271,7 +271,7 @@ class AssociatedRecord < ActiveRecord::Base
base_record = UtilSpec::BaseRecord.create!(persisted_string: 'foo')
ActiveType::Util.cast(base_record, UtilSpec::ExtendedRecord)

expect(base_record.attributes).to eq({ 'persisted_string' => 'foo'})
expect(base_record.attributes).to include('persisted_string' => 'foo')
end

context 'with option force: true' do
Expand Down

0 comments on commit 7e43b25

Please sign in to comment.