Skip to content
David Chandek-Stark edited this page Apr 23, 2015 · 3 revisions

Something like might be useful in application testing scenarios ...

equire "ezid-client"
require "securerandom"

module Ezid
  class MockIdentifier < Identifier

    self.defaults = {}

    def reload; self; end
    def reset; self; end

    private

    def mint
      self.id = SecureRandom.hex(4)
    end

    def create; end
    def modify; end

  end
end
Clone this wiki locally