Sha256: 258d5d101d397b1cdef7f237a418b60f8974777ed5a7a3c6eb328ef234efe2fc

Contents?: true

Size: 722 Bytes

Versions: 2

Compression:

Stored size: 722 Bytes

Contents

require "rspec"
require "shuwar"

describe Shuwar::Stdlib::Nokogiri do
  def rt
    a = Shuwar::Runtime.new
    a.load_lib :nokogiri
    a
  end

  def run(obj)
    rt.evaluate obj
  end

  it "should produce correct HtmlTag values" do
    # This does not actually test that it's created correctly!
    expect(run [:div,
                   [:quote,
                       [[:class, "test those classes"],
                       [:id, "test_id"]] ],

                "assxsasx"]

    ).to be_a Shuwar::Stdlib::Nokogiri::HtmlTag
  end

  it "should produce html" do
    run [:put_html, "aaa"]
    run [:put_html, [:div, [:quote, []], "xxx"]]
  end

  it "allows tags with no attrs" do
    run [:div, [:div, "aaa"]]
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
shuwar-1.3.0 spec/stdlib/nokogiri_spec.rb
shuwar-1.2.0 spec/stdlib/nokogiri_spec.rb