Skip to content

Commit

Permalink
Add specs for Data#to_h
Browse files Browse the repository at this point in the history
  • Loading branch information
herwinw committed Sep 25, 2024
1 parent 9341c0a commit f0e5c40
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions core/data/to_h_test.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
require_relative '../../spec_helper'
require_relative 'fixtures/classes'

ruby_version_is "3.2" do
describe "Data#to_h" do
it "transforms the data object into a hash" do
data = DataSpecs::Measure.new(amount: 42, unit: 'km')
data.to_h.should == { amount: 42, unit: 'km' }
end
end
end

0 comments on commit f0e5c40

Please sign in to comment.