Sha256: 7176e6f8b3acb145533e247ce710921bbdeb86e3edffaf7e44c417748cae268e

Contents?: true

Size: 697 Bytes

Versions: 7

Compression:

Stored size: 697 Bytes

Contents

require 'rubygems'
$:.unshift File.expand_path('../../lib', __FILE__)

gem 'asir'
require 'asir'

module ASIR
  module Test
    class TestError < ::Exception; end
    class TestObject
      include ASIR::Client
      attr_accessor :spec, :arg, :cls, :msg, :transport, :message
      def initialize spec
        @spec = spec
      end

      def get_data!
        @transport = ASIR::Transport.current
        @message = @transport && @transport.message
      end

      def return_argument arg
        get_data!
        @arg = arg
        arg
      end

      def raise_exception! cls, msg
        get_data!
        @cls = cls
        @msg = msg
        raise cls, msg
      end
    end
  end
end

Version data entries

7 entries across 7 versions & 3 rubygems

Version Path
asir_beanstalk-1.1.4 spec/spec_helper.rb
asir_zmq-1.1.1 spec/spec_helper.rb
asir_beanstalk-1.1.3 spec/spec_helper.rb
asir_resque-1.1.3 spec/spec_helper.rb
asir_beanstalk-1.1.2 spec/spec_helper.rb
asir_beanstalk-1.1.1 spec/spec_helper.rb
asir_zmq-1.1.0 spec/spec_helper.rb