spec/helpers_spec.rb in magic_grid-0.10.2 vs spec/helpers_spec.rb in magic_grid-0.10.3

- old
+ new

@@ -1,22 +1,24 @@ require 'spec_helper' require 'magic_grid/helpers' require 'action_controller' +require "active_support/core_ext" describe MagicGrid::Helpers do # Let's use the helpers the way they're meant to be used! include MagicGrid::Helpers let(:empty_collection) { [] } let(:column_list) { [:name, :description] } - - let(:view_renderer) { + let(:controller) { + request = double.tap{ |r| + r.stub(:fullpath, "/foo?page=bar") + } double.tap { |v| - v.stub(:render) + v.stub(:render) { nil } v.stub(:params) { {} } - # controller.stub(:option) - v.stub(:url_for) {|h| "/foo?page=#{h[:page]}"} + v.stub(:request) { request } } } describe "#normalize_magic" do