Sha256: 99ca1ddb8a054d8aaf482526cfb68855be176502a408884afef227033d239636

Contents?: true

Size: 760 Bytes

Versions: 2

Compression:

Stored size: 760 Bytes

Contents

require 'bundler/setup'
Bundler.require(:default, :test)

require 'rails/test_help'
require 'mocha/setup'

# require 'support/hstore'
require 'support/cassandra'
require 'support/issue'

module CassandraObject
  class TestCase < ActiveSupport::TestCase
    def temp_object(&block)
      Class.new(CassandraObject::Base) do
        self.column_family = 'Issues'
        string :force_save
        before_save { self.force_save = 'junk' }

        def self.name
          'Issue'
        end

        instance_eval(&block) if block_given?
      end
    end
  end

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

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
gotime-cassandra_object-4.12.2 test/test_helper.rb
gotime-cassandra_object-4.12.1 test/test_helper.rb