Sha256: 0f648d97b6c9e8c342d0d2d7bc28fdb378319dfa764204e2cff084c4dc7a51ae

Contents?: true

Size: 458 Bytes

Versions: 6

Compression:

Stored size: 458 Bytes

Contents

describe "all attrs" do

  it "raises a RuntimeError if tag has an unknown attribute" do
    should.raise(RuntimeError) {
      actual {
        a.href('/href') {
          tag![:attrs][:hi] = 'hiya'
          "here"
        }
      }
    }.message.should.match /Unknown attr: :hi/
  end

  it "escapes attributes" do
    target %^<a rel="&lt;hello">hello</a>^
    actual {
      a.rel('<hello') { 'hello' }
    }
  end

end # === describe all attrs







Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
www_app-1.3.0 specs/server-side/0010-attrs.rb
www_app-1.2.1 specs/server-side/0010-attrs.rb
www_app-1.2.0 specs/server-side/0010-attrs.rb
www_app-1.1.0 specs/server-side/0010-attrs.rb
www_app-1.0.1 specs/as_ruby/0010-attrs.rb
www_app-1.0.0 specs/as_ruby/0010-attrs.rb