Sha256: 6b8005c54c890c955e7fc661923140d8f648834d3e4b66df59ae3544b40a6e8d
Contents?: true
Size: 794 Bytes
Versions: 4
Compression:
Stored size: 794 Bytes
Contents
require 'spec_helper' require_relative '../../../app/helpers/riveter/enquiry_form_helper' describe Riveter::EnquiryFormHelper do subject { Class.new().tap do |klass| klass.send :include, Riveter::EnquiryFormHelper end.new() } describe "#enquiry_form_for" do it "delegates to default form_for" do enquiry = TestEnquiry.new() expect(subject).to receive(:form_for).with(enquiry.query_filter, :as => 'test', :url => 'test', :method => :get) subject.enquiry_form_for(enquiry) end it "delegates to simple form if available" do enquiry = TestEnquiry.new() expect(subject).to receive(:simple_form_for).with(enquiry.query_filter, :as => 'test', :url => 'test', :method => :get) subject.enquiry_form_for(enquiry) end end end
Version data entries
4 entries across 4 versions & 1 rubygems