require 'spec_helper'
describe BrDanfe::XML do
subject { described_class.new(xml_as_string) }
describe '#version_is_310_or_newer?' do
describe "when xml's version is equal 3.10" do
let(:xml_as_string) do
<<-eos
eos
end
it 'returns true' do
expect(subject.version_is_310_or_newer?).to eql true
end
end
describe "when xml's version is greather 3.10" do
let(:xml_as_string) do
<<-eos
eos
end
it 'returns true' do
expect(subject.version_is_310_or_newer?).to eql true
end
end
describe "when xml's version is minor that 3.10" do
let(:xml_as_string) do
<<-eos
eos
end
it 'returns false' do
expect(subject.version_is_310_or_newer?).to eql false
end
end
end
end