Sha256: 0106d94f255e0fe092e8a24187ee86050499af6febcd44623d6e0719db196236

Contents?: true

Size: 596 Bytes

Versions: 13

Compression:

Stored size: 596 Bytes

Contents

require File.dirname(__FILE__) + '/../spec_helper.rb'

describe Capture do
  it "should be blank when just created" do
    Capture.create.contents.should == ''
  end
  
  it "should append data to existing" do
    capture = Capture.create
    data1 = 'hello'
    data2 = 'world'
    
    capture.append(data1)
    capture.contents.should == data1
    
    capture.append(data2)
    capture.contents.should == data1 + data2
  end
  
  it "can clear its data" do
    capture = Capture.create
    capture.append('hello world')
    
    capture.clear!
    
    capture.contents.should == ''
  end
end

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
fabric-0.4.4 spec/classes/capture_spec.rb
fabric-0.4.3 spec/classes/capture_spec.rb
fabric-0.4.2 spec/classes/capture_spec.rb
fabric-0.4.1 spec/classes/capture_spec.rb
fabric-0.4.0 spec/classes/capture_spec.rb
fabric-0.3.6 spec/classes/capture_spec.rb
fabric-0.3.5 spec/classes/capture_spec.rb
fabric-0.3.4 spec/classes/capture_spec.rb
fabric-0.3.3 spec/classes/capture_spec.rb
fabric-0.3.2 spec/classes/capture_spec.rb
fabric-0.3.1 spec/classes/capture_spec.rb
fabric-0.3.0 spec/classes/capture_spec.rb
fabric-0.2.0 spec/classes/capture_spec.rb