Sha256: c302dda0b23c6ae99f698900bbc5476ecd547a9257f7d7811452fbeac85b33cb
Contents?: true
Size: 805 Bytes
Versions: 5
Compression:
Stored size: 805 Bytes
Contents
require "minitest_helper" module Hermod describe XmlSection do YesNoXml = XmlSection.build do |builder| builder.yes_no_node :awesome end describe "Yes/No nodes" do describe "when true" do subject do YesNoXml.new do |yes_no_xml| yes_no_xml.awesome true end end it "should include the node with yes as the contents" do expect(value_of_node("Awesome")).must_equal "yes" end end describe "when not true" do subject do YesNoXml.new do |yes_no_xml| yes_no_xml.awesome false end end it "should include the node with no as the contents" do expect(value_of_node("Awesome")).must_equal "no" end end end end end
Version data entries
5 entries across 5 versions & 1 rubygems