Sha256: c0851752edcd7f8abdf0648434db9060787f227256cf64f50cf4517c4f6d327a
Contents?: true
Size: 755 Bytes
Versions: 16
Compression:
Stored size: 755 Bytes
Contents
require 'spec_helper' describe 'LabelHelper' do include RSpec::Rails::HelperExampleGroup include Webrat::HaveTagMatcher before(:each) do @object = mock({ :errors => {:name => "Invalid name"} }) @object_name = :user end it "should show label tag" do helper.jquery_form_for(:new_post, :url => '/hello') do |builder| builder.label(:login).should have_tag("label") do |text| text.should contain("Login") end end end it "should show label tag with options" do helper.jquery_form_for(:new_post, :url => '/hello') do |builder| builder.label(:login, :for => "kuku").should have_tag("label[for='kuku']") do |text| text.should contain("Login") end end end end
Version data entries
16 entries across 16 versions & 1 rubygems