Sha256: 6041d6dc8e984ea8b87d7fe747279e2f5ff19f279f5ed837ffc63d32d0e081f4

Contents?: true

Size: 698 Bytes

Versions: 1

Compression:

Stored size: 698 Bytes

Contents

require "spec_helper"

describe Rocx::Elements::Paragraph do
  include ElementTestMacros

  context "with runs" do
    before(:each) do
      @node = described_class.new
      node.indentation.start = 720
      node.indentation.end = -1440
      run = Rocx::Elements::Run.new
      run << Rocx::Elements::Text.new("Hey Run 1")
      node << run
      run = Rocx::Elements::Run.new
      run << Rocx::Elements::Text.new("Hey Run 2")
      node << run
    end

    it_should_output_correct_xml node_xml: "paragraph_with_runs"
  end

  context "without runs" do
    before(:each) do
      @node = described_class.new
      node.alignment = :center
    end

    it_should_output_correct_xml
  end

end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
rocx-0.5.8 spec/elements/paragraph_spec.rb