Sha256: 9368432f36e1abeda9aacc6f585213fad989fe4d9d5e381e4edfb82cf9779853

Contents?: true

Size: 554 Bytes

Versions: 1

Compression:

Stored size: 554 Bytes

Contents

require 'spec'

require File.dirname(__FILE__) + '/../test'

describe Cotta do
  it 'should run example' do
    #system implementation is injected here
    cotta = Cotta.in_memory
    file = cotta.file('dir/file.txt')
    file.should_not be_exists
    # parent directories are created automatically
    file.save('my content')
    file2 = cotta.file('dir/file2.txt')
    file2.should_not be_exists
    file.copy_to(file2)
    file2.should be_exists
    file2.load.should == 'my content'
    file2.read {|file| puts file.gets}
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
cotta-1.0.0 test/cotta/example_spec.rb