Sha256: abb82d31ad7d416910cc16139ed1065e3fa47dc8eeb4e883a25e936498a456a2
Contents?: true
Size: 692 Bytes
Versions: 2
Compression:
Stored size: 692 Bytes
Contents
# encoding: utf-8 require 'spec_helper' require "hackpad/cli/store" describe Hackpad::Cli::Store do before :each do options = { "configdir" => File.expand_path('../../../files', __FILE__), "workspace" => 'default' } Hackpad::Cli::Store.prepare options end it "reads pads list from file" do File.stub(:read).and_return("gy23ui first one\ngy3u4 second one\n23489g third") list = Hackpad::Cli::Store.read_list expect(list).to be_an Array expect(list[0]).to be_an OpenStruct expect(list[0].id).to eq "gy23ui" expect(list[0].title).to eq "first one" expect(list[2].id).to eq "23489g" expect(list[2].title).to eq "third" end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
hackpad-cli-0.0.6 | spec/lib/hackpad/cli/store_spec.rb |
hackpad-cli-0.0.5 | spec/lib/hackpad/cli/store_spec.rb |