Sha256: 9855004045e8cb7585eb1250c2fe3bd00adf2cddf908e2c4ecb02762c25b49fb
Contents?: true
Size: 779 Bytes
Versions: 17
Compression:
Stored size: 779 Bytes
Contents
RSpec.describe LessonsIndexer::Addons::FileManager::Writer do before :each do @writer = described_class.new('test.txt') @writer << 'test' end after(:all) {File.delete('test.txt')} specify "#name" do expect(@writer.name).to eq('test.txt') end specify "#<<" do contents = IO.read(@writer.name) expect(contents).to eq('test') end context "#prepend_data" do before(:each) {@writer.prepend_data('prepended')} it "should add data to the beginning" do expect(IO.read(@writer.name)).to eq('prependedtest') end it "should not add data to the beginning if data is already present" do @writer.prepend_data('prepended') expect(IO.read(@writer.name)).to eq('prependedtest') end end end
Version data entries
17 entries across 17 versions & 1 rubygems