Sha256: 1e87905cb119adf97a35fa6814e55fd66828e3b1bc4986f3788cc5cefff74b1c

Contents?: true

Size: 718 Bytes

Versions: 15

Compression:

Stored size: 718 Bytes

Contents

require 'spec_helper'

describe Absa::H2h do
  
  before(:each) do
    @hash = {
      transmission: {
        header: {
          rec_id: "000",
          rec_status: "T",
          date: "20111221",
          client_code: "345",
          client_name: "DOUGLAS ANDERSON",
          transmission_no: "1234567",
          destination: "0",
          th_for_use_of_ld_user: "SPECIAL TOKEN HERE"
        }
      }
    }
  end
  
  it "should be able to build a document header" do
    header = Absa::H2h::Transmission::Document::Header.new(@hash[:transmission][:header])
    expected_string = File.open('./spec/examples/transmission_header_file.txt', "rb").read
    header.to_s.should == expected_string
  end
      
end

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
absa-h2h-0.1.11 spec/lib/transmission/header_spec.rb
absa-h2h-0.1.10 spec/lib/transmission/header_spec.rb
absa-h2h-0.1.9 spec/lib/transmission/header_spec.rb
absa-h2h-0.1.8 spec/lib/transmission/header_spec.rb
absa-h2h-0.1.7 spec/lib/transmission/header_spec.rb
absa-h2h-0.1.6 spec/lib/transmission/header_spec.rb
absa-h2h-0.1.5 spec/lib/transmission/header_spec.rb
absa-h2h-0.1.4 spec/lib/transmission/header_spec.rb
absa-h2h-0.1.3 spec/lib/transmission/header_spec.rb
absa-h2h-0.1.2 spec/lib/transmission/header_spec.rb
absa-h2h-0.1.1 spec/lib/transmission/header_spec.rb
absa-h2h-0.1.0 spec/lib/transmission/header_spec.rb
absa-h2h-0.0.13 spec/lib/transmission/header_spec.rb
absa-h2h-0.0.12 spec/lib/transmission/header_spec.rb
absa-h2h-0.0.11 spec/lib/transmission/header_spec.rb