Sha256: 05d44e20104a63e2c3c03635d6d45cf4d4bd7ba44f563d9f1f21477cfaba9953
Contents?: true
Size: 593 Bytes
Versions: 26
Compression:
Stored size: 593 Bytes
Contents
require 'spec_helper' describe Locomotive::Liquid::Tags::Javascript do context '#validating syntax' do it 'validates a basic syntax' do lambda do Locomotive::Liquid::Tags::Javascript.new('javascript', '', ["{% endjavascript %}"], {}) end.should_not raise_error end end context '#rendering' do template = "{% javascript %}alert('Locomotive rocks!'){% endjavascript %}" rendered = "<script type=\"text/javascript\">\n//<![CDATA[\nalert('Locomotive rocks!')\n//]]>\n</script>" Liquid::Template.parse(template).render.should == rendered end end
Version data entries
26 entries across 26 versions & 1 rubygems