Sha256: 98cd5d8af7eb8b8a5c553ca9bcb069a198bba09a6aa32793f417ade1ac1a0c27

Contents?: true

Size: 784 Bytes

Versions: 3

Compression:

Stored size: 784 Bytes

Contents

require_relative 'spec_helper'

module Basic101

  describe Transcript do

    let(:path) {'/tmp/foo.bas'}
    let(:input_file) {StringIO.new}
    let(:output_file) {StringIO.new}
    subject {Transcript.new(input_file, output_file)}

    context 'nothing written' do
      specify do
        expect(input_file.string).to eq ''
        expect(output_file.string).to eq ''
      end
    end

    context 'output written' do
      specify do
        subject.save_output 'abc'
        expect(input_file.string).to eq ''
        expect(output_file.string).to eq 'abc'
      end
    end

    context 'input written' do
      specify do
        subject.save_input 'abc'
        expect(input_file.string).to eq 'abc'
        expect(output_file.string).to eq ''
      end
    end

  end

end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
basic101-0.4.0 test/spec/transcript_spec.rb
basic101-0.2.0 test/spec/transcript_spec.rb
basic101-0.1.0 test/spec/transcript_spec.rb