odba 1.1.9 → 1.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/test/test_marshal.rb CHANGED
@@ -1,33 +1,23 @@
1
1
  #!/usr/bin/env ruby
2
-
3
- $: << File.expand_path('../lib', File.dirname(__FILE__))
4
-
5
- require 'minitest/autorun'
6
- require 'flexmock/test_unit'
7
- require 'flexmock'
8
- require 'odba/marshal'
2
+ require_relative "helper"
3
+ require "odba/marshal"
9
4
 
10
5
  module ODBA
11
- class TestMarshal < Minitest::Test
12
- def setup
13
- @foo = Array.new
14
- end
6
+ class TestMarshal < Test::Unit::TestCase
7
+ def setup
8
+ @foo = []
9
+ end
10
+
15
11
  def teardown
16
12
  super
17
13
  end
18
- def test_dump
19
- assert_equal("04085b00",ODBA::Marshal.dump(@foo))
20
- end
21
- def test_load
22
- assert_equal(@foo, ODBA::Marshal.load("04085b00"))
23
- end
24
- def test_load_18_in_19
25
- if RUBY_VERSION >= '1.9' and false
26
- require 'odba/18_19_loading_compatibility'
27
- binary = "\004\bu:\tDate=\004\b[\bo:\rRational\a:\017@numeratori\003\205\353J:\021@denominatori\ai\000i\003\031\025#".unpack('H*').first
28
- date = Marshal.load(binary)
29
- assert_equal Date.new(2009,5,27), date
30
- end
14
+
15
+ def test_dump
16
+ assert_equal("04085b00", ODBA::Marshal.dump(@foo))
17
+ end
18
+
19
+ def test_load
20
+ assert_equal(@foo, ODBA::Marshal.load("04085b00"))
31
21
  end
32
- end
22
+ end
33
23
  end