Sha256: 7a3f64e6312cd997ff42dc60cbd3d243dea678ba02c02a28b04441a5730f86ea

Contents?: true

Size: 750 Bytes

Versions: 11

Compression:

Stored size: 750 Bytes

Contents

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

require 'support/connect'
autoload :Issue, 'support/issue'

module CassandraObject
  class TestCase < ActiveSupport::TestCase
    teardown do
      Issue.delete_all
    end

    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)
      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

11 entries across 11 versions & 1 rubygems

Version Path
gotime-cassandra_object-4.2.0 test/test_helper.rb
gotime-cassandra_object-4.1.0 test/test_helper.rb
gotime-cassandra_object-4.0.2 test/test_helper.rb
gotime-cassandra_object-4.0.1 test/test_helper.rb
gotime-cassandra_object-4.0.0 test/test_helper.rb
gotime-cassandra_object-3.0.5 test/test_helper.rb
gotime-cassandra_object-3.0.4 test/test_helper.rb
gotime-cassandra_object-3.0.3 test/test_helper.rb
gotime-cassandra_object-3.0.2 test/test_helper.rb
gotime-cassandra_object-3.0.1 test/test_helper.rb
gotime-cassandra_object-3.0.0 test/test_helper.rb