Sha256: 20de35fe19366c3e8737d73229c2f95340dee623f84400895d85d7727cbe0d68

Contents?: true

Size: 859 Bytes

Versions: 16

Compression:

Stored size: 859 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?
    set_testing_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

16 entries across 16 versions & 1 rubygems

Version Path
djatoka-0.4.1 test/test_djatoka.rb
djatoka-0.4.0 test/test_djatoka.rb
djatoka-0.3.2 test/test_djatoka.rb
djatoka-0.3.1 test/test_djatoka.rb
djatoka-0.3.0 test/test_djatoka.rb
djatoka-0.2.4 test/test_djatoka.rb
djatoka-0.2.3 test/test_djatoka.rb
djatoka-0.2.2 test/test_djatoka.rb
djatoka-0.2.1 test/test_djatoka.rb
djatoka-0.2.0 test/test_djatoka.rb
djatoka-0.0.11 test/test_djatoka.rb
djatoka-0.0.10 test/test_djatoka.rb
djatoka-0.0.9 test/test_djatoka.rb
djatoka-0.0.8 test/test_djatoka.rb
djatoka-0.0.7 test/test_djatoka.rb
djatoka-0.0.6 test/test_djatoka.rb