Sha256: c9e6c4e89644eb2396655c3e80e9b356d237a2ad9c0d32059aa31e7b5857e3dc
Contents?: true
Size: 434 Bytes
Versions: 1
Compression:
Stored size: 434 Bytes
Contents
shared_examples_for "input" do let(:form) { mock(data: {myfield: "some value"}) } let(:name) { "myfield" } context "with custom attributes" do let(:options) { {autofocus: true, class: "some-class"} } let(:html) { Form::Component::Input.new(form, name, options).to_html } subject { Nokogiri(html).css("input").first } its(["type"]) { should eql(type) } its(["value"]) { should eql("some value") } end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
form-0.0.1.alpha1 | spec/support/input_shared.rb |