1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* test/psych/test_yamlstore.rb: make test case inherit from MiniTest,

load psych/helper so that psych is loaded.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33654 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
tenderlove 2011-11-07 11:27:27 +00:00
parent a27349a4cb
commit 8ff37e3901
2 changed files with 8 additions and 4 deletions

View file

@ -1,3 +1,8 @@
Mon Nov 7 20:26:37 2011 Aaron Patterson <aaron@tenderlovemaking.com>
* test/psych/test_yamlstore.rb: make test case inherit from MiniTest,
load psych/helper so that psych is loaded.
Mon Nov 7 20:18:29 2011 Aaron Patterson <aaron@tenderlovemaking.com> Mon Nov 7 20:18:29 2011 Aaron Patterson <aaron@tenderlovemaking.com>
* test/psych/test_yamldbm.rb: Test case should inherit from MiniTest, * test/psych/test_yamldbm.rb: Test case should inherit from MiniTest,

View file

@ -1,12 +1,11 @@
require 'test/unit' require 'psych/helper'
require 'psych'
require 'yaml/store' require 'yaml/store'
require 'tmpdir' require 'tmpdir'
module Psych module Psych
Psych::Store = YAML::Store unless defined?(Psych::Store) Psych::Store = YAML::Store unless defined?(Psych::Store)
class YAMLStoreTest < Test::Unit::TestCase class YAMLStoreTest < TestCase
def setup def setup
@engine, YAML::ENGINE.yamler = YAML::ENGINE.yamler, 'psych' @engine, YAML::ENGINE.yamler = YAML::ENGINE.yamler, 'psych'
@dir = Dir.mktmpdir("rubytest-file") @dir = Dir.mktmpdir("rubytest-file")
@ -78,7 +77,7 @@ module Psych
end end
def test_writing_inside_readonly_transaction_raises_error def test_writing_inside_readonly_transaction_raises_error
assert_raise(PStore::Error) do assert_raises(PStore::Error) do
@yamlstore.transaction(true) do @yamlstore.transaction(true) do
@yamlstore[:foo] = "bar" @yamlstore[:foo] = "bar"
end end