Sha256: ff3fae14763f65ff283d0d5cc12a652aa0909b86884ecedc7d869b02281d9596

Contents?: true

Size: 789 Bytes

Versions: 22

Compression:

Stored size: 789 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
          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
          value_of_node("Awesome").must_equal "no"
        end
      end
    end
  end
end

Version data entries

22 entries across 22 versions & 1 rubygems

Version Path
hermod-2.6.2 spec/hermod/xml_section_builder/yes_no_node_spec.rb
hermod-2.6.1 spec/hermod/xml_section_builder/yes_no_node_spec.rb
hermod-2.5.3 spec/hermod/xml_section_builder/yes_no_node_spec.rb
hermod-2.5.2 spec/hermod/xml_section_builder/yes_no_node_spec.rb
hermod-2.5.1 spec/hermod/xml_section_builder/yes_no_node_spec.rb
hermod-2.5.0 spec/hermod/xml_section_builder/yes_no_node_spec.rb
hermod-2.4.1 spec/hermod/xml_section_builder/yes_no_node_spec.rb
hermod-2.4.0 spec/hermod/xml_section_builder/yes_no_node_spec.rb
hermod-2.2.0 spec/hermod/xml_section_builder/yes_no_node_spec.rb
hermod-2.1.0 spec/hermod/xml_section_builder/yes_no_node_spec.rb
hermod-1.2.9 spec/hermod/xml_section_builder/yes_no_node_spec.rb
hermod-1.2.8 spec/hermod/xml_section_builder/yes_no_node_spec.rb
hermod-1.2.7 spec/hermod/xml_section_builder/yes_no_node_spec.rb
hermod-1.2.6 spec/hermod/xml_section_builder/yes_no_node_spec.rb
hermod-1.2.5 spec/hermod/xml_section_builder/yes_no_node_spec.rb
hermod-1.2.4 spec/hermod/xml_section_builder/yes_no_node_spec.rb
hermod-1.2.3 spec/hermod/xml_section_builder/yes_no_node_spec.rb
hermod-1.2.2 spec/hermod/xml_section_builder/yes_no_node_spec.rb
hermod-1.2.1 spec/hermod/xml_section_builder/yes_no_node_spec.rb
hermod-1.2.0 spec/hermod/xml_section_builder/yes_no_node_spec.rb