Sha256: fcd61b924126783b8f8ff772a0ab2d8c4f257da5997bf489bf101920010a63c2

Contents?: true

Size: 838 Bytes

Versions: 4

Compression:

Stored size: 838 Bytes

Contents

require 'helper'

class TestDjatoka < Test::Unit::TestCase
  should 'allow Djatoka.use_curb to be set' do
    Djatoka.use_curb=true
    assert Djatoka.use_curb?
  end

  with_a_resolver do
    should 'be able to set Djatoka.resolver to a Djatoka::Resolver' do
      Djatoka.resolver = @resolver
      assert Djatoka.resolver.is_a? Djatoka::Resolver
    end

    should 'be able to set Djatoka.resolver to a URL and get a Djatoka::Resolver' do
      Djatoka.resolver = 'http://african.lanl.gov/adore-djatoka/resolver'
      assert Djatoka.resolver.is_a? Djatoka::Resolver
      assert_equal 'http://african.lanl.gov/adore-djatoka/resolver', Djatoka.resolver.url
    end

    should_eventually 'not be able to set a Djatoka.resolver to a bad string' do
      Djatoka.resolver = 'asdf'
      assert Djatoka.resolver.nil?
    end
  end

end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
djatoka-0.0.5 test/test_djatoka.rb
djatoka-0.0.4 test/test_djatoka.rb
djatoka-0.0.3 test/test_djatoka.rb
djatoka-0.0.2 test/test_djatoka.rb