Sha256: ba64de03df5dabbe5d8e5ac496499826e8dd980a8f8e4fd60f8ac52e9dcc5c4f
Contents?: true
Size: 1022 Bytes
Versions: 11
Compression:
Stored size: 1022 Bytes
Contents
require "spec_helper" module Refinery describe PaginationHelper do describe "#pagination_css_class" do context "when request.xhr? and params[:from_page] is set" do before do controller.request.stub(:xhr?).and_return(true) end context "when params[:from_page] > params[:page] or 1" do it "does something" do helper.stub(:params).and_return({:from_page => 2, :page => 1}) helper.pagination_css_class.should == "frame_left" end end context "when params[:from_page] < params[:page] or 1" do it "returns frame_right" do helper.stub(:params).and_return({:from_page => 1, :page => 1}) helper.pagination_css_class.should == "frame_right" end end end context "when request.xhr? and params[:from_page] isn't set" do it "returns frame_center" do helper.pagination_css_class.should == "frame_center" end end end end end
Version data entries
11 entries across 11 versions & 1 rubygems