Sha256: 4dbabb820ede5d13e882ebb3686bc01fe68e561ad499c11e950b0ab70b7ad85b

Contents?: true

Size: 370 Bytes

Versions: 2

Compression:

Stored size: 370 Bytes

Contents

module RSpec
  module Helpers
    module RecordReaderHelper

      def stub_reader_with_records(records)
        reader = instance_double "DataForge::File::RecordFileReader"

        match_records = receive(:each_record)
        records.each { |record| match_records.and_yield record }
        allow(reader).to match_records

        reader
      end

    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
data_forge-0.1.1 spec/support/helpers/record_reader_helper.rb
data_forge-0.1 spec/support/helpers/record_reader_helper.rb