Sha256: 70962a097553586070c9deee357f3f016e1b355e8f5fa841c647499cdb3a94ce
Contents?: true
Size: 1.3 KB
Versions: 46
Compression:
Stored size: 1.3 KB
Contents
# -*- encoding : utf-8 -*- RSpec.describe Bootstrap::Component::HorizontalForm do describe "horizontal form" do subject { Card["A"].format(:html) } let(:form) do subject.bs_horizontal_form 2, 10 do group do input "email", label: "Email Address", id: "theemail" input "password", label: "Password", id: "thepassword" end group do #checkbox "test", label: "checkbox label", id: "thecheckbox" end end end let(:bsform) do subject.bs do horizontal_form 2, 10 do group do input "email", label: "Email Address", id: "theemail" input "password", label: "Password", id: "thepassword" end group do checkbox "test", label: "checkbox label", id: "thecheckbox" end end end end it "creates form" do expect(form).to have_tag 'form.form-horizontal' do with_tag 'div.form-group' do with_tag 'label.col-sm-2.control-label[for="theemail"]', text: /Email Address/ with_tag 'div.col-sm-10' do with_tag 'input.form-control#theemail[type="email"]' end end # with_tag 'div.form-group' do # with_tag 'input[type="checkbox"]' # end end end end end
Version data entries
46 entries across 46 versions & 1 rubygems