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