Sha256: cc03bd975ef7461774118fe4af96de13bc9da231dff1b93e0b48866e5105d83d

Contents?: true

Size: 470 Bytes

Versions: 2

Compression:

Stored size: 470 Bytes

Contents

require 'spec_helper'

describe Clieop::Payment::File do

  context "#save" do

    it "should create 'filename' and put the CLIEOP data in it" do
      file = mock('file')
      File.should_receive(:open).with("filename", "w").and_yield(file)
      file.should_receive(:write).with("0001A#{Date.today.strftime('%d%m%y')}CLIEOP03         1                     \r\n9999A                                             \r\n")
      subject.save('filename')
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
clieop-1.0.1 spec/clieop/payment/file_spec.rb
clieop-1.0.0 spec/clieop/payment/file_spec.rb