Re: [rspec-users] Stub a controller method containing arguments

2012-09-09 Thread David Chelimsky
On Sun, Sep 9, 2012 at 1:00 AM, jeevan reddy wrote: > controller code: > > class BooksController < ApplicationController > def index >param1, param2 = "123", "456" > @test = method_1(param1, param2) > end > > private > def method_1(param1, param2) > return "test" > end > end

[rspec-users] Stub a controller method containing arguments

2012-09-08 Thread jeevan reddy
controller code: class BooksController < ApplicationController def index param1, param2 = "123", "456" @test = method_1(param1, param2) end private def method_1(param1, param2) return "test" end end controller tests describe "GET index" do it "get books" do param1, pa