Sha256: 969982824db58fd9970a638d06be77f631670eb6925d7fba55680cf57b7d230c

Contents?: true

Size: 716 Bytes

Versions: 6

Compression:

Stored size: 716 Bytes

Contents

require File.expand_path '../test_helper.rb', __FILE__
require 'minitest/autorun'
require 'filentory/datastore'

class TestDatastore < Minitest::Test
  def test_initialisation_with_a_name 
    ds = Datastore.new("a name")

    assert_equal("a name", ds.name)
  end

  def test_can_set_a_type
    ds = Datastore.new("")
    ds.mediatype= "DVD"

    assert_equal("DVD", ds.mediatype)
  end

  def test_can_add_array_of_files
    ds = Datastore.new("File")
    names = ["a", "b"]
    ds.files= Array.new (names)

    assert_equal(names, ds.files)
  end

  def test_can_add__files
    ds = Datastore.new("File")
    names = ["a", "b"]
    ds.files << "a"
    ds.files << "b"

    assert_equal(names, ds.files)
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
filentory-cli-0.6.2 test/tc_datastore.rb
filentory-cli-0.6.1 test/tc_datastore.rb
filentory-cli-0.6.0 test/tc_datastore.rb
filentory-cli-0.5.0 test/tc_datastore.rb
filentory-cli-0.4.0 test/tc_datastore.rb
filentory-cli-0.3.1 test/tc_datastore.rb