require 'spec_helper' describe Weeler::ActionView::Helpers::FormHelper, :type => :helper do let(:resource) { FactoryGirl.create :dummy_post } let(:helper) { ActionView::Helpers::FormBuilder.new(:post, resource, self, {})} let(:output) { helper.image_upload_field :image } it 'create file field' do expect(output).to include 'type="file"' expect(output).to include 'name="post[image]"' end it 'creates a label' do expect(output).to include '