Sha256: 06aaa0555edd9a4565d67696a6e76f285bd6ff6d5c0476c93cc89185651dcacb
Contents?: true
Size: 635 Bytes
Versions: 2
Compression:
Stored size: 635 Bytes
Contents
require 'spec_helper' describe FileComponent do include RSpec::Rails::RequestExampleGroup context 'form' do it 'should render form field' do pending @post = Fabricate :post get admin_posts_path field = controller.form_fields[:filename] component = '' controller.view_context.form_for @post, :url => admin_post_path(@post) do |form| component = Puffer::Component::Base.render_component(controller, field, :form, :form => form) end component.should have_selector('label[for=post_filename]') component.should have_selector('input[type=file]') end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
puffer-0.1.1 | spec/components/file_component_spec.rb |
puffer-0.1.0 | spec/app/components/file_component_spec.rb |