test/test-schema.rb in red-arrow-0.16.0 vs test/test-schema.rb in red-arrow-0.17.0

- old
+ new

@@ -14,10 +14,12 @@ # KIND, either express or implied. See the License for the # specific language governing permissions and limitations # under the License. class SchemaTest < Test::Unit::TestCase + include Helper::Omittable + def setup @count_field = Arrow::Field.new("count", :uint32) @visible_field = Arrow::Field.new("visible", :boolean) end @@ -110,9 +112,23 @@ test("not Arrow::Schema") do assert do not (@schema == 29) end + end + end + + sub_test_case("#to_s") do + test("show_metadata") do + require_gi_bindings(3, 4, 2) + + schema = @schema.with_metadata("key" => "value") + assert_equal(<<-SCHEMA.chomp, schema.to_s(show_metadata: true)) +count: uint32 +visible: bool +-- metadata -- +key: value + SCHEMA end end end end