summaryrefslogtreecommitdiff
path: root/spec/ruby/library/yaml/fixtures
diff options
context:
space:
mode:
authoreregon <eregon@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-09-20 20:18:52 +0000
committereregon <eregon@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-09-20 20:18:52 +0000
commit1d15d5f08032acf1b7bceacbb450d617ff6e0931 (patch)
treea3785a79899302bc149e4a6e72f624ac27dc1f10 /spec/ruby/library/yaml/fixtures
parent75bfc6440d595bf339007f4fb280fd4d743e89c1 (diff)
Move spec/rubyspec to spec/ruby for consistency
* Other ruby implementations use the spec/ruby directory. [Misc #13792] [ruby-core:82287] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59979 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'spec/ruby/library/yaml/fixtures')
-rw-r--r--spec/ruby/library/yaml/fixtures/common.rb10
-rw-r--r--spec/ruby/library/yaml/fixtures/example_class.rb5
-rw-r--r--spec/ruby/library/yaml/fixtures/strings.rb36
-rw-r--r--spec/ruby/library/yaml/fixtures/test_yaml.yml2
4 files changed, 53 insertions, 0 deletions
diff --git a/spec/ruby/library/yaml/fixtures/common.rb b/spec/ruby/library/yaml/fixtures/common.rb
new file mode 100644
index 0000000000..1d868806f1
--- /dev/null
+++ b/spec/ruby/library/yaml/fixtures/common.rb
@@ -0,0 +1,10 @@
+begin
+ require 'syck'
+rescue LoadError
+ # do nothing
+end
+
+require 'yaml'
+
+$test_file = tmp("yaml_test_file")
+$test_parse_file = File.dirname(__FILE__) + "/test_yaml.yml"
diff --git a/spec/ruby/library/yaml/fixtures/example_class.rb b/spec/ruby/library/yaml/fixtures/example_class.rb
new file mode 100644
index 0000000000..751435a305
--- /dev/null
+++ b/spec/ruby/library/yaml/fixtures/example_class.rb
@@ -0,0 +1,5 @@
+class FooBar
+ def initialize(name)
+ @name = name
+ end
+end
diff --git a/spec/ruby/library/yaml/fixtures/strings.rb b/spec/ruby/library/yaml/fixtures/strings.rb
new file mode 100644
index 0000000000..6f66dc3659
--- /dev/null
+++ b/spec/ruby/library/yaml/fixtures/strings.rb
@@ -0,0 +1,36 @@
+$complex_key_1 = <<EOY
+ ? # PLAY SCHEDULE
+ - Detroit Tigers
+ - Chicago Cubs
+ :
+ - 2001-07-23
+
+ ? [ New York Yankees,
+ Atlanta Braves ]
+ : [ 2001-07-02, 2001-08-12,
+ 2001-08-14 ]
+EOY
+
+$to_yaml_hash =
+<<EOY
+-
+ avg: 0.278
+ hr: 65
+ name: Mark McGwire
+-
+ avg: 0.288
+ hr: 63
+ name: Sammy Sosa
+EOY
+
+$multidocument = <<EOY
+---
+- Mark McGwire
+- Sammy Sosa
+- Ken Griffey
+
+# Team ranking
+---
+- Chicago Cubs
+- St Louis Cardinals
+EOY
diff --git a/spec/ruby/library/yaml/fixtures/test_yaml.yml b/spec/ruby/library/yaml/fixtures/test_yaml.yml
new file mode 100644
index 0000000000..efe3b5cc1a
--- /dev/null
+++ b/spec/ruby/library/yaml/fixtures/test_yaml.yml
@@ -0,0 +1,2 @@
+project:
+ name: RubySpec