Sha256: 1e53fdd2b5cd340d5e1d3d86df62cde69292d282a6a44973ad3e7d27f4ef4f5a

Contents?: true

Size: 780 Bytes

Versions: 5

Compression:

Stored size: 780 Bytes

Contents

$LOAD_PATH.unshift(File.dirname(__FILE__))
$LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '../../..'))

#require 'weakref'

require 'xamplr'

Xampl.set_default_persister_kind(:in_memory)

require 'xampl-generated-code/all'
require 'author'

require 'spec'
require 'spec/autorun'

Spec::Runner.configure do |config|

end

module XamplTestRedis

  @@load_time = Time.now.to_i.to_s
  @@scratch_name_count = 0

  def XamplTestRedis.scratch_name(prefix='scratch')
    "#{prefix}-#{ @@load_time }-#{ @@scratch_name_count += 1 }"
  end

  class DroolingIdiotPersistedObject
    include Xampl::XamplPersistedObject

    attr_accessor :pid

    def initialize(pid)
      @pid = pid
    end

    def get_the_index
      @pid
    end

    def persisted?
      true
    end

  end

end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
xamplr-1.9.20 lib/xamplr/tests/redis/spec_helper.rb
xamplr-1.9.18 lib/xamplr/tests/redis/spec_helper.rb
xamplr-1.9.16 lib/xamplr/tests/redis/spec_helper.rb
xamplr-1.9.15 lib/xamplr/tests/redis/spec_helper.rb
xamplr-1.9.14 lib/xamplr/tests/redis/spec_helper.rb