require "spec_helper" describe BrDanfe::DanfeLib::XML do subject { BrDanfe::DanfeLib::XML.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