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] I am having a problem testing a date in a rails view

2009-06-18 Thread powertoaster
I fixed this problem, I was only checking for a partial string rather than the full string in the element. The way I discovere dit for those who are interested was by printing out the response.body object so that I could view the actuall content I was testing against.:jumping: -- View this messag

Re: [rspec-users] I am having a problem testing a date in a rails view

2009-06-12 Thread powertoaster
This is not an rspec failure message. What other gems do you have at play? Also, what versions of rspec, rspec-rails, ruby, rails, OS, etc? http://wiki.github.com/dchelimsky/rspec/get-in-touch Rails 2.3.2 Ruby 1.8 Rspec 1.2.6 calendar_date_select 1.15 (I am not using this on the index page) va

[rspec-users] I am having a problem testing a date in a rails view

2009-06-11 Thread powertoaster
I see June 13, 2009 on my index page when running in development. I get this 2. is not true. require File.expand_path(File.dirname(__FILE__) + '/../../spec_helper') describe "/timesheets/index.html.erb" do include TimesheetsHelper before(:each) do assigns[:timesheets] = [