Sha256: bad3994279b81f21d7e864289c58568554726d62b3573baea4432a19742428a5

Contents?: true

Size: 822 Bytes

Versions: 5

Compression:

Stored size: 822 Bytes

Contents

require 'test/unit'
require 'fileutils'
require 'pathname'
require 'tmpdir'

require 'openid/filestore'
require 'storetestcase'

class FileStoreTestCase < Test::Unit::TestCase
  include StoreTestCase

  @@dir = Pathname.new(Dir.tmpdir).join('filstoretest')

  def setup
    FileUtils.rm_rf(@@dir)
    @store = OpenID::FilesystemStore.new(@@dir)    
  end

  def teardown
    FileUtils.rm_rf(@@dir)
  end
end

class DumbStoreTestCase < Test::Unit::TestCase
  include StoreTestCase

  def setup
    @store = OpenID::DumbStore.new('unit-test')
  end

  def test_nonce
    assert_equal(true, @store.use_nonce('anything'))
  end

end

class MemoryStoreTestCase < Test::Unit::TestCase
  include StoreTestCase

  @@dir = Pathname.new(Dir.tmpdir).join('filstoretest')

  def setup
    @store = OpenID::MemoryStore.new
  end

end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
ruby-openid-1.1.2 test/teststore.rb
ruby-openid-1.1.4 test/teststore.rb
ruby-openid-1.0.2 test/teststore.rb
ruby-openid-1.1.1 test/teststore.rb
ruby-openid-1.1.3 test/teststore.rb