spec/lib/shellplay/session_spec.rb in shellplay-0.1.0 vs spec/lib/shellplay/session_spec.rb in shellplay-0.1.1
- old
+ new
@@ -2,23 +2,24 @@
require "shellplay/session"
describe Shellplay::Session, "A shellplay session" do
- let(:sessionfile) { File.expand_path('../../../files/session.json', __FILE__)}
+ let(:basedir) { File.expand_path('../../../files/config', __FILE__) }
+ let(:basefile) { 'session.json' }
let(:input) { StringIO.new }
let(:output) { StringIO.new }
- subject { Shellplay::Session.new(input, output) }
+ subject { Shellplay::Session.new(basedir, basefile, input, output) }
describe '.new' do
context 'when there is no prior configuration file, ' do
end
end
describe ".import" do
context "when we import a valid file, " do
- before { subject.import(sessionfile) }
+ before { subject.import('session') }
it "fills up instance variables from the file" do
expect(subject.title).to eq "test prez"
end
end