Sha256: e4ae0039ca36a47816da88f8e03d3cc6480418b6fcc9e3bbcba5a001d47e6977
Contents?: true
Size: 569 Bytes
Versions: 10
Compression:
Stored size: 569 Bytes
Contents
require 'spec_helper' require 'approvals/dotfile' describe Approvals::Dotfile do let(:dotfile) { '/tmp/.approvals' } before(:each) do allow(Approvals::Dotfile).to receive(:path).and_return dotfile Approvals::Dotfile.reset end it "appends the text" do Approvals::Dotfile.append('text') expect(File.readlines(dotfile).map(&:chomp)).to eq ['text'] end it "appends the text exactly once" do Approvals::Dotfile.append('text') Approvals::Dotfile.append('text') expect(File.readlines(dotfile).map(&:chomp)).to eq ['text'] end end
Version data entries
10 entries across 10 versions & 2 rubygems