Sha256: 2c921a75de9b14586b3cc8c0b7c7a6572c1de1775a8a377ff3e1be4cca14f7f5
Contents?: true
Size: 763 Bytes
Versions: 9
Compression:
Stored size: 763 Bytes
Contents
require 'spec_helper' describe Kaminari::Helpers::Tag do subject { Kaminari::Helpers::Tag.new(template, options) } let(:template) { double(params: {}) } let(:scope) { double(url_for: '') } describe '#page_url_for' do context "with scope option given" do let(:options) { {scope: scope} } it "calls url_for on that url proxy scope." do template.should_not_receive(:url_for) scope.should_receive(:url_for) subject.page_url_for(1) end end context "with no scope option given" do let(:options) { {} } it "calls url_for on the template." do template.should_receive(:url_for) scope.should_not_receive(:url_for) subject.page_url_for(1) end end end end
Version data entries
9 entries across 9 versions & 1 rubygems