Sha256: 954a78540bfd5f1b260e6da701909fac30c7319b1809b59952b44834d20f9262

Contents?: true

Size: 782 Bytes

Versions: 4

Compression:

Stored size: 782 Bytes

Contents

require 'rubygems'
require 'bundler/setup'
require 'test/unit'
require 'cassandra/0.8'
require 'gotime-cassandra_object'

class Issue < CassandraObject::Base
  key :uuid
  string :description
end

module CassandraObject
  class TestCase < ActiveSupport::TestCase
    setup do
      CassandraObject::Base.establish_connection(
        keyspace: 'place_directory_development',
        # servers: '192.168.0.100:9160'
        servers: '127.0.0.1:9160'
      )
    end

    teardown do
      Issue.delete_all
    end

    def connection
      CassandraObject::Base.connection
    end
  end

  module Types
    class TestCase < ActiveSupport::TestCase
      attr_accessor :coder
      setup do
        @coder = self.class.name.sub(/Test$/, '').constantize.new
      end
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
gotime-cassandra_object-2.6.3 test/test_helper.rb
gotime-cassandra_object-2.6.1 test/test_helper.rb
gotime-cassandra_object-2.6.0 test/test_helper.rb
gotime-cassandra_object-2.5.0 test/test_helper.rb