Sha256: c9e7abddca7c01d7c90fbd5146765d48d2dec2dfe328b9ca8d8027160b4ab590

Contents?: true

Size: 783 Bytes

Versions: 1

Compression:

Stored size: 783 Bytes

Contents

require 'test_helper'

class DirectConnectionTest < GemeraldBeanstalkTest

  context 'autoload' do

    should 'automatically load plugin' do
      GemeraldBeanstalk::Beanstalk.expects(:load_plugin).with(:DirectConnection)
      load 'gemerald_beanstalk/plugins/direct_connection.rb'
    end

  end


  context 'instance methods' do

    setup do
      @beanstalk = GemeraldBeanstalk::Beanstalk.new('localhost:11300')
      @beanstalk.extend(GemeraldBeanstalk::Plugin::DirectConnection)
    end


    context '#direct_connection_client' do

      should 'return a new GemeraldBeanstalk::DirrectConnection' do
        assert_kind_of(
          GemeraldBeanstalk::Plugin::DirectConnection::Client,
          @beanstalk.direct_connection_client
        )
      end

    end

  end

end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
gemerald_beanstalk-0.1.0 test/unit/plugins/direct_connection_test.rb