Sha256: 29214162c697f8e50b285564df9bc08676347945d367be623004a7690c3ad416

Contents?: true

Size: 881 Bytes

Versions: 8

Compression:

Stored size: 881 Bytes

Contents

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

I18n.config.enforce_available_locales = false

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

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

def MiniTest.filter_backtrace(bt)
  bt
end

module Superstore
  class TestCase < ActiveSupport::TestCase
    def temp_object(&block)
      Class.new(Superstore::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 < Superstore::TestCase
      attr_accessor :coder
      setup do
        @coder = self.class.name.sub(/Test$/, '').constantize.new
      end
    end
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
superstore-1.0.12 test/test_helper.rb
superstore-1.0.11 test/test_helper.rb
superstore-1.0.10 test/test_helper.rb
superstore-1.0.9 test/test_helper.rb
superstore-1.0.8 test/test_helper.rb
superstore-1.0.7 test/test_helper.rb
superstore-1.0.6 test/test_helper.rb
superstore-1.0.5 test/test_helper.rb