Sha256: aef52cc4a2ae0a7251139ae4a6e215662922ccadabe1fc1d8113abe74ab8fcef
Contents?: true
Size: 674 Bytes
Versions: 8
Compression:
Stored size: 674 Bytes
Contents
require 'spec_helper' describe StringComponent do include RSpec::Rails::RequestExampleGroup context 'form' do it 'should render form field' do @category = Fabricate :category get admin_categories_path field = controller.form_fields[:title] component = '' controller.view_context.form_for @category, :url => admin_category_path(@category) do |form| component = Puffer::Component::Base.render_component(controller, field, :form, :form => form) end component.should have_selector('label[for=category_title]') component.should have_selector("input[type=text][value='#{@category.title}']") end end end
Version data entries
8 entries across 8 versions & 1 rubygems