Sha256: f8066c81236f568fb713700b6ad134d0535eb1567a1e658441cbe90cb85acd7d

Contents?: true

Size: 779 Bytes

Versions: 3

Compression:

Stored size: 779 Bytes

Contents

# encoding: utf-8
load File.expand_path( '../spec_helper.rb', File.dirname(__FILE__) )

describe Remote::Session::SendString do

  context 'attributes' do
    subject { Remote::Session::SendString.new( 'foo', 'bar' ) }

    specify( 'string' )      { subject.string.should      == 'foo' }
    specify( 'remote_path' ) { subject.remote_path.should == 'bar' }
    specify( 'chunk_size' )  { subject.chunk_size.should  == 1024  }
  end

  context 'instance_methods' do

    subject { Remote::Session::SendString.new( 'foo', 'remote/path' ) }

    context '#open' do

      it 'should instantiate a StringIO' do
        @stringio = stub( 'stringio' )
        StringIO.should_receive( :new ).with( 'foo' ).and_return( @stringio )

        subject.open
      end

    end

  end

end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
remote-session-0.0.6 spec/unit/send_string_spec.rb
remote-session-0.0.5 spec/unit/send_string_spec.rb
remote-session-0.0.4 spec/unit/send_string_spec.rb