Sha256: daa4387b46281cabca71a900ff22e58ef1e7fbba9046c374319ed1cc6adda96f
Contents?: true
Size: 944 Bytes
Versions: 16
Compression:
Stored size: 944 Bytes
Contents
# encoding: utf-8 require 'spec_helper' describe GitFile do context 'initialize' do it 'requires a path' do expect { GitFile.new('dir/path.txt') }.not_to raise_error end it 'accepts content' do expect { GitFile.new('dir/path.txt', 'content') }.not_to raise_error end end context '#name' do it 'has a name' do file = GitFile.new('file.txt') expect(file.name).to eq(:file) end end context '#extension?' do it 'checks if extension is the same' do file = GitFile.new('path.txt') expect(file).to be_extension('.txt') end end context '#content' do it 'returns the content of file' do file = GitFile.new('file.txt', 'content') expect(file.content).to eq('content') end end context '#nil?' do it 'is always false' do file = GitFile.new('file.txt') expect(file.nil?).to be_false end end end
Version data entries
16 entries across 16 versions & 1 rubygems