From c91a3a74d2934e6cf47a6498ad006853889624e8 Mon Sep 17 00:00:00 2001 From: Panos Dalitsouris Date: Sat, 10 Oct 2020 09:32:10 +0300 Subject: [PATCH] Sample --- stdlib/yaml/sample.yaml | 19 +++++++++++++++++++ test/stdlib/YAML_test.rb | 12 ++++++++++++ 2 files changed, 31 insertions(+) create mode 100644 stdlib/yaml/sample.yaml create mode 100644 test/stdlib/YAML_test.rb diff --git a/stdlib/yaml/sample.yaml b/stdlib/yaml/sample.yaml new file mode 100644 index 0000000000..f50bdf5758 --- /dev/null +++ b/stdlib/yaml/sample.yaml @@ -0,0 +1,19 @@ +--- +# An employee record +name: Martin D'vloper +job: Developer +skill: Elite +employed: True +foods: + - Apple + - Orange + - Strawberry + - Mango +languages: + perl: Elite + python: Elite + pascal: Lame +education: | + 4 GCSEs + 3 A-Levels + BSc in the Internet of Things \ No newline at end of file diff --git a/test/stdlib/YAML_test.rb b/test/stdlib/YAML_test.rb new file mode 100644 index 0000000000..11552e439a --- /dev/null +++ b/test/stdlib/YAML_test.rb @@ -0,0 +1,12 @@ +require_relative "test_helper" +require 'yaml' + +class YAMLTest < Minitest::Test + include TypeAssertions + library 'yaml' + testing 'singleton(::YAML)' + + def test_load_accepts_string + assert_send_type "(String) -> untyped", YAML, :load, "abcde" + end +end