Sha256: 3617334df2e842015f62b4fe5fe8a0192454b45cc1c719cf7e89d4fb221855ab

Contents?: true

Size: 853 Bytes

Versions: 41

Compression:

Stored size: 853 Bytes

Contents

require File.expand_path(File.dirname(__FILE__) + '/../test_helper')
require 'rbbt/persist'
require 'rbbt/annotations'
require 'rbbt/util/tmpfile'
require 'test/unit'

module TestAnnotation
  extend Annotation

  self.annotation :test_annotation
end

class TestPersist < Test::Unit::TestCase

  def test_array_persist
    TmpFile.with_file do |tmp|
      10.times do
        assert_equal ["1", "2"],(Persist.persist("Test", :array, :file => tmp) do
          ["1", "2"]
        end)
      end
    end

    TmpFile.with_file do |tmp|
      10.times do
        assert_equal [],(Persist.persist("Test", :array, :file => tmp) do
          []
        end)
      end
    end

    TmpFile.with_file do |tmp|
      10.times do
        assert_equal ["1"],(Persist.persist("Test", :array, :file => tmp) do
          ["1"]
        end)
      end
    end
  end
end

Version data entries

41 entries across 41 versions & 1 rubygems

Version Path
rbbt-util-5.9.12 test/rbbt/test_persist.rb
rbbt-util-5.9.11 test/rbbt/test_persist.rb
rbbt-util-5.9.10 test/rbbt/test_persist.rb
rbbt-util-5.9.8 test/rbbt/test_persist.rb
rbbt-util-5.9.7 test/rbbt/test_persist.rb
rbbt-util-5.9.6 test/rbbt/test_persist.rb
rbbt-util-5.9.5 test/rbbt/test_persist.rb
rbbt-util-5.9.4 test/rbbt/test_persist.rb
rbbt-util-5.9.3 test/rbbt/test_persist.rb
rbbt-util-5.9.2 test/rbbt/test_persist.rb
rbbt-util-5.9.1 test/rbbt/test_persist.rb
rbbt-util-5.9.0 test/rbbt/test_persist.rb
rbbt-util-5.8.10 test/rbbt/test_persist.rb
rbbt-util-5.8.9 test/rbbt/test_persist.rb
rbbt-util-5.8.8 test/rbbt/test_persist.rb
rbbt-util-5.8.7 test/rbbt/test_persist.rb
rbbt-util-5.8.6 test/rbbt/test_persist.rb
rbbt-util-5.8.4 test/rbbt/test_persist.rb
rbbt-util-5.8.3 test/rbbt/test_persist.rb
rbbt-util-5.8.2 test/rbbt/test_persist.rb