Sha256: ba291ceedb70368c5013776f078c1be2a9cfcef2992655c81db59cf47f38ff27

Contents?: true

Size: 825 Bytes

Versions: 2

Compression:

Stored size: 825 Bytes

Contents

require 'spec_helper'

describe Empezar::Scaffold do
  describe 'initialize' do 
    before do 
      @file_descriptor = stub 'file descriptor'
      @file_name = stub 'file name'
      @smas = stub 'smas serialization'
      @symbolmatrix = stub 'symbolmatrix'
      @writer = stub 'writer'
      @yaml_output = stub 'yaml output'
    end

    it 'should build a file with the YAML dump from the data' do 
      SymbolMatrix.should_receive(:new).with(@smas)
        .and_return @symbolmatrix
      @symbolmatrix.should_receive(:to).and_return @writer
      @writer.should_receive(:yaml).and_return @yaml_output

      Fast.should_receive(:file).and_return @file_descriptor

      @file_descriptor.should_receive(:write)
        .with(@file_name, @yaml_output)

      Empezar::Scaffold.new @smas, @file_name
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
empezar-0.4.1 spec/empezar/scaffold_spec.rb
empezar-0.4.0 spec/empezar/scaffold_spec.rb