Sha256: b1696132c593ff3a9ebf73b8b7f9c9292f42113917baacb78ab5b9a5fbf186e8
Contents?: true
Size: 1.45 KB
Versions: 6
Compression:
Stored size: 1.45 KB
Contents
require 'spec_helper' describe Sheet do describe 'opening sheets' do it 'should instantiate Sheet::Open' do open = double('Sheet::Open') open.should_receive(:open) Sheet::Open.stub(:new).with('cucumber') { open } Sheet.new('cucumber').process end end describe 'creating sheets' do it 'should instantiate Sheet::Write' do write = double('Sheet::Write') write.should_receive(:write) Sheet::Write.stub(:new).with('rails') { write } Sheet.new('new', 'rails').process end end describe 'editing sheets' do it 'should instantiate Sheet::Write' do write = double('Sheet::Write') write.should_receive(:write) Sheet::Write.stub(:new).with('rails') { write } Sheet.new('edit', 'rails').process end end describe 'list sheets' do it 'should instantiate Sheet::List' do list = double('Sheet::List') list.should_receive(:list) Sheet::List.stub(:new) { list } Sheet.new('ls').process end it 'should instantiate Sheet::List with empty arguments' do list = double('Sheet::List') list.should_receive(:list) Sheet::List.stub(:new) { list } Sheet.new.process end end describe 'copy sheet' do it 'should instantiate Sheet::Copy' do copy = double('Sheet::Copy') copy.should_receive(:copy) Sheet::Copy.stub(:new).with('git') { copy } Sheet.new('copy', 'git').process end end end
Version data entries
6 entries across 6 versions & 1 rubygems