Sha256: b834ec7f7033d28168b3f382c7691ce1d6f7cb682c618b00f5b33daf0b6d5855
Contents?: true
Size: 783 Bytes
Versions: 3
Compression:
Stored size: 783 Bytes
Contents
describe Curly::ComponentScanner do it "scans the component name, identifier, and attributes" do scan('hello.world weather="sunny"').should == [ "hello", "world", { "weather" => "sunny" }, [] ] end it "allows context namespaces" do scan('island:beach:hello.world').should == [ "hello", "world", {}, ["island", "beach"] ] end it "allows a question mark after the identifier" do scan('hello.world?').should == ["hello?", "world", {}, []] end it 'allows spaces before and after component' do scan(' hello.world weather="sunny" ').should == [ "hello", "world", { "weather" => "sunny" }, [] ] end def scan(component) described_class.scan(component) end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
curly-templates-2.5.0 | spec/component_scanner_spec.rb |
curly-templates-2.4.1 | spec/component_scanner_spec.rb |
curly-templates-2.4.0 | spec/component_scanner_spec.rb |