Re: [rspec-users] Testing my rails authentication controller

2009-06-19 Thread powertoaster
David thank you, that worked great. I am doing this and am very happy with the result. Employee.stub(:authenticate).with(params[:username], params[:password]).and_return(nil) post :login, params session[:employee_id].should be_nil response.should redirect_to(:controller =>

Re: [rspec-users] spec for view with Searchlogic

2009-06-19 Thread Andrea Jahn
Hi, for using rspec with the SearchLogic plugin we found the following solutions to mock/stub the necessary objects/methods: Views: # create search logic values @search = mock("search") @search.stub!(:page_count).and_return(2) assigns[:search] = @search @plannings_count = 20 assigns

Re: [rspec-users] spec for view with Searchlogic

2009-06-19 Thread Andrea Jahn
Hi, for using rspec with the SearchLogic plugin we found the following solutions to mock/stub the necessary objects/methods: Views: # create search logic values @search = mock("search") @search.stub!(:page_count).and_return(2) assigns[:search] = @search @plannings_count = 20 assigns

Re: [rspec-users] Spork 0.57

2009-06-19 Thread Yi Wen
Yup, removing the condition fixed the problem. Thanks! On Jun 19, 2009, at 9:34 AM, David Chelimsky wrote: On Fri, Jun 19, 2009 at 9:33 AM, David Chelimsky wrote: On Fri, Jun 19, 2009 at 9:24 AM, Yi Wen wrote: Hello, I has spork 0.5.0 and worked fine. now I updated to spork 0.5.7 which s

Re: [rspec-users] Spork 0.57

2009-06-19 Thread David Chelimsky
On Fri, Jun 19, 2009 at 9:24 AM, Yi Wen wrote: > Hello, > > I has spork 0.5.0 and worked fine. now I updated to spork 0.5.7 which seems > to break the existing setting. The stack trace looks like this: > > Using RSpec > Preloading Rails environment > Loading Spork.prefork block... > uninitialized c

Re: [rspec-users] Spork 0.57

2009-06-19 Thread David Chelimsky
On Fri, Jun 19, 2009 at 9:33 AM, David Chelimsky wrote: > On Fri, Jun 19, 2009 at 9:24 AM, Yi Wen wrote: >> Hello, >> >> I has spork 0.5.0 and worked fine. now I updated to spork 0.5.7 which seems >> to break the existing setting. The stack trace looks like this: >> >> Using RSpec >> Preloading Rai

[rspec-users] Spork 0.57

2009-06-19 Thread Yi Wen
Hello, I has spork 0.5.0 and worked fine. now I updated to spork 0.5.7 which seems to break the existing setting. The stack trace looks like this: Using RSpec Preloading Rails environment Loading Spork.prefork block... uninitialized constant MissingSourceFile (NameError) /my_proj/vendor/gems/