diff --git a/core/data/to_h_test.rb b/core/data/to_h_test.rb new file mode 100644 index 000000000..55277a3f9 --- /dev/null +++ b/core/data/to_h_test.rb @@ -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