Sha256: c10dc7637476e2d5c6bfa2deeaffa7d519e258ca875a3cbde5980f6903e9ee0e

Contents?: true

Size: 970 Bytes

Versions: 11

Compression:

Stored size: 970 Bytes

Contents

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

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

require 'cassandra_object'
require 'support/cassandra'
require 'support/issue'
require 'support/issue_dynamic'
require 'support/issue_custom_config'
require 'support/issue_schema'
require 'support/issue_schema_child'
require 'support/issue_schema_father'
require 'support/issue_schema_ck'

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

11 entries across 11 versions & 1 rubygems

Version Path
extendi-cassandra_object-1.1.1 test/test_helper.rb
extendi-cassandra_object-1.1.0 test/test_helper.rb
extendi-cassandra_object-1.0.20 test/test_helper.rb
extendi-cassandra_object-1.0.19 test/test_helper.rb
extendi-cassandra_object-1.0.18 test/test_helper.rb
extendi-cassandra_object-1.0.17 test/test_helper.rb
extendi-cassandra_object-1.0.16 test/test_helper.rb
extendi-cassandra_object-1.0.15 test/test_helper.rb
extendi-cassandra_object-1.0.14 test/test_helper.rb
extendi-cassandra_object-1.0.13 test/test_helper.rb
extendi-cassandra_object-1.0.12 test/test_helper.rb