Sha256: 8de717d09b5b6efdf1cbeded0801ac6f2841773d5195d709127c382b82f304d8
Contents?: true
Size: 852 Bytes
Versions: 40
Compression:
Stored size: 852 Bytes
Contents
describe Ppl::Command::Ls do before(:each) do @command = Ppl::Command::Ls.new @input = Ppl::Application::Input.new @output = double(Ppl::Application::Output) @storage = double(Ppl::Adapter::Storage) @format = double(Ppl::Format::AddressBook) @address_book = double(Ppl::Entity::AddressBook) @command.format = @format @command.storage = @storage end describe "#name" do it "should be 'ls'" do @command.name.should eq "ls" end end describe "#execute" do it "should show the list of contacts in the address book" do @storage.should_receive(:load_address_book).and_return(@address_book) @format.should_receive(:process).and_return("list of contacts") @output.should_receive(:line).with("list of contacts") @command.execute(@input, @output) end end end
Version data entries
40 entries across 40 versions & 1 rubygems