Sha256: 98b48ec1f29df33cf4251d0dc5945697ff6ab3a85403e27f9044332270f6ba25
Contents?: true
Size: 946 Bytes
Versions: 6
Compression:
Stored size: 946 Bytes
Contents
describe :script do it "raises Invalid_Relative_HREF if :src is not relative" do should.raise(Escape_Escape_Escape::Invalid_Relative_HREF) { actual do script.src('http://www.example.org/file.js')./ end }.message.should.match /example\.org/ end it "allows a relative :src" do target %^<script src="/file.js"></script>^ actual { script.src('/file.js')./ } end it "escapes slashes in attr :src" do target %^<script src="/dir/file.js"></script>^ actual { script.src('/dir/file.js')./ } end it "does not allow vars in :script :src attribute" do target :body, <<-EOF <script src="help"></script> EOF actual do script.src(:help) end end it "ignores text for :script block" do target %^<script src="/hello.js"></script>^ actual { script.src('/hello.js') { 'hello' } } end end # === describe :JS ===
Version data entries
6 entries across 6 versions & 1 rubygems