Sha256: 41fdd3962554b760b1581fc0ce866aee36f3c37fb1332a001e701fc04509bd3d

Contents?: true

Size: 736 Bytes

Versions: 25

Compression:

Stored size: 736 Bytes

Contents

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

require 'support/connect'
require 'support/teardown'
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

25 entries across 25 versions & 2 rubygems

Version Path
gotime-cassandra_object-4.12.0 test/test_helper.rb
gotime-cassandra_object-4.11.6 test/test_helper.rb
gotime-cassandra_object-4.11.5 test/test_helper.rb
gotime-cassandra_object-4.11.4 test/test_helper.rb
gotime-cassandra_object-4.11.3 test/test_helper.rb
gotime-cassandra_object-4.11.2 test/test_helper.rb
gotime-cassandra_object-4.11.1 test/test_helper.rb
gotime-cassandra_object-4.11.0 test/test_helper.rb
gotime-cassandra_object-4.10.5 test/test_helper.rb
gotime-cassandra_object-4.10.4 test/test_helper.rb
gotime-cassandra_object-4.10.3 test/test_helper.rb
gotime-cassandra_object-4.10.2 test/test_helper.rb
gotime-cassandra_object-4.10.1 test/test_helper.rb
cassandra_object_rails-0.0.1 test/test_helper.rb
gotime-cassandra_object-4.10.0 test/test_helper.rb
gotime-cassandra_object-4.9.2 test/test_helper.rb
gotime-cassandra_object-4.9.1 test/test_helper.rb
gotime-cassandra_object-4.9.0 test/test_helper.rb
gotime-cassandra_object-4.8.1 test/test_helper.rb
gotime-cassandra_object-4.8.0 test/test_helper.rb