Sha256: 956383be643302471724feb259b776235ae94133cfb5b00bfcbd2fef475be857

Contents?: true

Size: 643 Bytes

Versions: 2

Compression:

Stored size: 643 Bytes

Contents

require 'spec_helper'

describe TextComponent 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[:body]
      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_body]')
      component.should have_selector('textarea', :content => @post.body)
    end

  end

end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
puffer-0.1.1 spec/components/text_component_spec.rb
puffer-0.1.0 spec/app/components/text_component_spec.rb