Sha256: 46a9b4a446f2b94fef78aa299ac4bb891c69acca544765ca1899e7779c934bef

Contents?: true

Size: 560 Bytes

Versions: 11

Compression:

Stored size: 560 Bytes

Contents

describe :link do

  it "raises Invalid_Relative_HREF" do
    should.raise(Escape_Escape_Escape::Invalid_Relative_HREF) {
      actual do
        link.href('http://www.google.com/')./
      end
    }.message.should.match /google/
  end

  it "escapes slashes in :href" do
    target %^<link href="&#47;css&#47;css&#47;styles.css" />^
    actual {
      link.href('/css/css/styles.css')./
    }
  end

  it "allows a relative :href" do
    target %^<link href="&#47;css.css" />^
    actual {
      link.href('/css.css')./
    }
  end

end # === describe :link

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
www_app-2.1.1 specs/server-side/0021-link.rb
www_app-2.1.0 specs/server-side/0021-link.rb
www_app-2.0.2 specs/server-side/0021-link.rb
www_app-2.0.1 specs/server-side/0021-link.rb
www_app-2.0.0 specs/server-side/0021-link.rb
www_app-1.3.0 specs/server-side/0021-link.rb
www_app-1.2.1 specs/server-side/0021-link.rb
www_app-1.2.0 specs/server-side/0021-link.rb
www_app-1.1.0 specs/server-side/0021-link.rb
www_app-1.0.1 specs/as_ruby/0021-link.rb
www_app-1.0.0 specs/as_ruby/0021-link.rb