Sha256: fc2073e83dc0595d18d8ceb69ef9f03abc6702bba922377461bd3268809c7483

Contents?: true

Size: 378 Bytes

Versions: 5

Compression:

Stored size: 378 Bytes

Contents

require "spec_helper"

describe ElementFactory::Elements::TextElement do
  subject { described_class.new("Some text") }

  context ".to_html" do
    it "returns the text" do
      expect(subject.to_html).to eq("Some text")
    end

    it "escapes naughty things" do
      subject.string = "Some & Thing"
      expect(subject.to_html).to eq("Some & Thing")
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
element_factory-0.1.4 spec/lib/elements/text_element_spec.rb
element_factory-0.1.3 spec/lib/elements/text_element_spec.rb
element_factory-0.1.2 spec/lib/elements/text_element_spec.rb
element_factory-0.1.1 spec/lib/elements/text_element_spec.rb
element_factory-0.1.0 spec/lib/elements/text_element_spec.rb