Sha256: 4e7e2d9ef35e420301496b84536215beaa1d91a99eb2b6dba90eec3bfc0cd90e
Contents?: true
Size: 593 Bytes
Versions: 20
Compression:
Stored size: 593 Bytes
Contents
require 'spec_helper' require 'tempfile' require 'rollbar/item/backtrace' describe Rollbar::Item::Backtrace do describe '#get_file_lines' do subject { described_class.new(exception) } let(:exception) { Exception.new } let(:file) { Tempfile.new('foo') } before do File.open(file.path, 'w') do |f| f << "foo\nbar" end end it 'returns the lines of the file' do lines = subject.get_file_lines(file.path) expect(lines.size).to be_eql(2) expect(lines[0]).to be_eql('foo') expect(lines[1]).to be_eql('bar') end end end
Version data entries
20 entries across 20 versions & 1 rubygems