1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26
|
require 'spec_helper'
describe Buff::Ignore::BuffIgnoreError do
it 'inherits from StandardError' do
expect(subject).to be_a(StandardError)
end
end
describe Buff::Ignore::IgnoreFileNotFound do
let(:path) { '/path/to/file' }
subject { described_class.new(path) }
it 'accepts a filepath as the parameter' do
expect {
described_class.new(path)
}.to_not raise_error
end
context 'when path is nil' do
let(:path) { nil }
it 'has the correct message' do
expect(subject.message).to eq("No ignore file found at ''!")
end
end
end
|