Re: [rspec-users] Specing protected methods

2008-10-23 Thread Bastien
-- Bastien On Oct 23, 3:51 pm, "David Chelimsky" <[EMAIL PROTECTED]> wrote: > On Thu, Oct 23, 2008 at 6:49 AM, Bastien <[EMAIL PROTECTED]> wrote: > > I totally agree with the ''listening to your specs" concepts and > > always divide my code i

Re: [rspec-users] Specing protected methods

2008-10-23 Thread Bastien
specific to that class, and would actually be easy to spec. Except that it's not possible to call a protected method from a spec as far as I know, correct me if I m wrong. (I maybe didn't explain my problem well in the first place) Regards -- Bastien On Oct 23, 12:37 pm, Matt Wynne <[EMAIL

[rspec-users] Specing protected methods

2008-10-23 Thread Bastien
Hi everyone, Do anyone know if there's a way to spec protected methods ? Thanks in advance -- Bastien ___ rspec-users mailing list rspec-users@rubyforge.org http://rubyforge.org/mailman/listinfo/rspec-users

Re: [rspec-users] Can't access actions of a singular nested resource

2008-08-01 Thread Bastien
Thanks for your help Aslak, but I still didn't manage to make it pass >> get :show, :id=>"34" it sends me this error then : No route matches {:action=>"show", :controller=>"surveys/report", :id=>"34"} >> Try rake routes, and also try to spec the routing in the associated >> routing_spec.rb. and

[rspec-users] Can't access actions of a singular nested resource

2008-07-31 Thread Bastien
I can't figure out what I do wrong there, I have a nested controller which is defined as a singular resource, the routing works properly, but inside my specs the request never goes through the show action. I keep on getting this error : Spec::Mocks::MockExpectationError in 'Surveys::ReportControl

Re: [rspec-users] [Stories]Troubles with GivenScenario

2008-03-25 Thread Bastien
done : http://rspec.lighthouseapp.com/projects/5645-rspec/tickets/350 Thanks for your great work. On Mar 25, 1:00 pm, "David Chelimsky" <[EMAIL PROTECTED]> wrote: > On Tue, Mar 25, 2008 at 6:31 AM, Bastien <[EMAIL PROTECTED]> wrote: > > Of course,

Re: [rspec-users] [Stories]Troubles with GivenScenario

2008-03-25 Thread Bastien
wer") do Reply.find(:all).size.should == @replies + 1 @replies = Reply.find(:all).size end Then("there should be no more question to answer") do session[:pending_questions].size.should == 0 session[:current_question].should == nil end Then("the profile sho

[rspec-users] [Stories]Troubles with GivenScenario

2008-03-25 Thread Bastien
I have some problems with GivenScenario, my scenario keeps on failing when I use GivenScenario, like if the database or the session was not in the same state at the beginning of the new scenario as it was at the end of the given one. If I try to group my two scenari in only one big scenario then it

[rspec-users] [Stories]Changes in the database not taken into account

2008-03-11 Thread Bastien
I have these scenarios : Story: Filling a profile As a user I want to fill a profile So that I can see my score Scenario: Starting a new profile ...* And 3 questions ...* When the user answers a que

Re: [rspec-users] [Stories] Login and subdomain

2008-03-10 Thread Bastien
Thanks to all of you, I added the login as a part of the story and now it works smoothly. On Mar 7, 9:35 pm, "Zach Dennis" <[EMAIL PROTECTED]> wrote: > In case it isn't clear... I agree with Ivo's statement: > > "You should not stub the authentication method in a story. The story > should test the

Re: [rspec-users] [Stories] Login and subdomain

2008-03-06 Thread Bastien
; session you want at that moment. > > Regards > Ivo Dancet > > Op 6-mrt-08, om 16:12 heeft Bastien het volgende geschreven: > > > > > Thanks David, this works just fine. I would rather do some stubbing > > there if it's possible though. I tried : > > &

Re: [rspec-users] [Stories] Login and subdomain

2008-03-06 Thread Bastien
stubbing ? On Mar 6, 3:33 pm, Ivo Dancet <[EMAIL PROTECTED]> wrote: > I think you can also use: > > post "/authentication/login", > { :login => user_email, >:password => password }, > :host => "company.example.com" > > Op 5-mrt-08,

[rspec-users] [Stories] Login and subdomain

2008-03-06 Thread Bastien
I've just begin using rspec stories, and i m encountering some problems. In my application i have different subdomains in which specific users can log in, for example an admin will go to admin.myapp.com/authenticate/login, and an user belonging to a specific company will log in company.myapp.com/au