Sha256: f8a34340d0d44d3d4b3ddd461bdc6d6ad47d99f1c61b67a0c139794670f25df7

Contents?: true

Size: 804 Bytes

Versions: 7

Compression:

Stored size: 804 Bytes

Contents

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

if p = ENV['ASIR_LIB_PATH']
  $:.unshift File.expand_path(p)
else
  gem 'asir'
end
require 'asir'
require 'asir/transport/beanstalk'

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 & 1 rubygems

Version Path
asir_beanstalk-1.2.8 spec/spec_helper.rb
asir_beanstalk-1.2.7 spec/spec_helper.rb
asir_beanstalk-1.2.6 spec/spec_helper.rb
asir_beanstalk-1.2.5 spec/spec_helper.rb
asir_beanstalk-1.2.3 spec/spec_helper.rb
asir_beanstalk-1.2.0 spec/spec_helper.rb
asir_beanstalk-1.1.5 spec/spec_helper.rb