Re: [rspec-users] step definitons to check login

2008-12-16 Thread Zach Dennis
On Tue, Dec 16, 2008 at 8:30 PM, Zach Dennis wrote: > On Tue, Dec 16, 2008 at 7:48 PM, Andrew Premdas wrote: >> So I can confirm that I'm logged in, that the user is who I say he is, etc. >> >> e.g >> >> Then /^I should be logged in$/ do >> controller.logged_in?.should be_true >> end >> >> make

Re: [rspec-users] step definitons to check login

2008-12-16 Thread aslak hellesoy
On Wed, Dec 17, 2008 at 1:48 AM, Andrew Premdas wrote: > So I can confirm that I'm logged in, that the user is who I say he is, etc. > > e.g > > Then /^I should be logged in$/ do > controller.logged_in?.should be_true Or: controller.should be_logged_in Aslak > > end > > makes sense? > > 20

Re: [rspec-users] step definitons to check login

2008-12-16 Thread Zach Dennis
On Tue, Dec 16, 2008 at 7:48 PM, Andrew Premdas wrote: > So I can confirm that I'm logged in, that the user is who I say he is, etc. > > e.g > > Then /^I should be logged in$/ do > controller.logged_in?.should be_true > end > > makes sense? I know why you're doing it, but I just want to know *w

Re: [rspec-users] step definitons to check login

2008-12-16 Thread Andrew Premdas
So I can confirm that I'm logged in, that the user is who I say he is, etc. e.g Then /^I should be logged in$/ do controller.logged_in?.should be_true end makes sense? 2008/12/16 Zach Dennis > On Tue, Dec 16, 2008 at 6:47 PM, Andrew Premdas > wrote: > > Doing this for Restful-Authenticatio

Re: [rspec-users] step definitons to check login

2008-12-16 Thread Zach Dennis
On Tue, Dec 16, 2008 at 6:47 PM, Andrew Premdas wrote: > Doing this for Restful-Authentication I add the following in > features/support/env.rb > > # Make visible for testing > ApplicationController.send(:public, :logged_in?, :current_user, > :authorized?) Why do you need these available for cucu

Re: [rspec-users] step definitons to check login

2008-12-16 Thread Andrew Premdas
Doing this for Restful-Authentication I add the following in features/support/env.rb # Make visible for testing ApplicationController.send(:public, :logged_in?, :current_user, :authorized?) Hopefully something similar will work with Authlogic Andrew 2008/12/16 James Byrne > I am working with

Re: [rspec-users] Warnings

2008-12-16 Thread aslak hellesoy
On Tue, Dec 16, 2008 at 11:46 PM, Scott Taylor wrote: > > On Dec 16, 2008, at 5:17 PM, Avdi Grimm wrote: > > So I was running my specs with -w the other day, and noticed a lot of >> warnings being produced. Some of these appear to be coming from RSpec >> internals, which is an issue in its own r

Re: [rspec-users] Warnings

2008-12-16 Thread Scott Taylor
On Dec 16, 2008, at 5:17 PM, Avdi Grimm wrote: So I was running my specs with -w the other day, and noticed a lot of warnings being produced. Some of these appear to be coming from RSpec internals, which is an issue in its own right but not the subject of this email. What I'm asking about rig

[rspec-users] Warnings

2008-12-16 Thread Avdi Grimm
So I was running my specs with -w the other day, and noticed a lot of warnings being produced. Some of these appear to be coming from RSpec internals, which is an issue in its own right but not the subject of this email. What I'm asking about right now is this. Given an example of the form:

Re: [rspec-users] [Cucumber] factor out non-user steps

2008-12-16 Thread Pat Maddox
Jonathan Linowes writes: > On Dec 16, 2008, at 6:50 AM, aidy lewis wrote: > >> Hi, >> >> I have a step that has been defined by the user >> >> Given /a logged in user/ {} >> >> Now in that step I have my own step (not defined by the business) of >> >> Given "all projects have been deleted" >> >>

Re: [rspec-users] New article on "Listening to Your Specs" up on Ruby Advent 2008

2008-12-16 Thread Ben Mabey
Lenny Marks wrote: On Dec 9, 2008, at 10:40 PM, Avdi Grimm wrote: I contributed an article on BDD and RSpec to the Ruby Advent Calendar 2008, going over some of the rules I've collected for interpreting what your specs say about your design. It can be found here: http://advent2008.hackruby.co

Re: [rspec-users] New article on "Listening to Your Specs" up on Ruby Advent 2008

2008-12-16 Thread David Chelimsky
On Tue, Dec 16, 2008 at 2:51 PM, Ben Mabey wrote: > David Chelimsky wrote: >> >> On Tue, Dec 16, 2008 at 2:01 PM, Lenny Marks wrote: >> >>> >>> On Dec 9, 2008, at 10:40 PM, Avdi Grimm wrote: >>> >>> I contributed an article on BDD and RSpec to the Ruby Advent Calendar 2008, going o

Re: [rspec-users] New article on "Listening to Your Specs" up on Ruby Advent 2008

2008-12-16 Thread David Chelimsky
On Tue, Dec 16, 2008 at 2:47 PM, Pat Maddox wrote: > Lenny Marks writes: > >> On Dec 9, 2008, at 10:40 PM, Avdi Grimm wrote: >> >>> I contributed an article on BDD and RSpec to the Ruby Advent Calendar >>> 2008, going over some of the rules I've collected for interpreting >>> what your specs say

Re: [rspec-users] New article on "Listening to Your Specs" up on Ruby Advent 2008

2008-12-16 Thread Ben Mabey
David Chelimsky wrote: On Tue, Dec 16, 2008 at 2:01 PM, Lenny Marks wrote: On Dec 9, 2008, at 10:40 PM, Avdi Grimm wrote: I contributed an article on BDD and RSpec to the Ruby Advent Calendar 2008, going over some of the rules I've collected for interpreting what your specs say about

Re: [rspec-users] New article on "Listening to Your Specs" up on Ruby Advent 2008

2008-12-16 Thread Pat Maddox
Lenny Marks writes: > On Dec 9, 2008, at 10:40 PM, Avdi Grimm wrote: > >> I contributed an article on BDD and RSpec to the Ruby Advent Calendar >> 2008, going over some of the rules I've collected for interpreting >> what your specs say about your design. It can be found here: >> http://advent20

Re: [rspec-users] New article on "Listening to Your Specs" up on Ruby Advent 2008

2008-12-16 Thread David Chelimsky
On Tue, Dec 16, 2008 at 2:01 PM, Lenny Marks wrote: > > On Dec 9, 2008, at 10:40 PM, Avdi Grimm wrote: > >> I contributed an article on BDD and RSpec to the Ruby Advent Calendar >> 2008, going over some of the rules I've collected for interpreting >> what your specs say about your design. It can

Re: [rspec-users] New article on "Listening to Your Specs" up on Ruby Advent 2008

2008-12-16 Thread Lenny Marks
On Dec 9, 2008, at 10:40 PM, Avdi Grimm wrote: I contributed an article on BDD and RSpec to the Ruby Advent Calendar 2008, going over some of the rules I've collected for interpreting what your specs say about your design. It can be found here: http://advent2008.hackruby.com/past/2008/12/10/

Re: [rspec-users] step definitons to check login

2008-12-16 Thread David Chelimsky
On Tue, Dec 16, 2008 at 1:34 PM, James Byrne wrote: > I am working with the authlogic gem and trying to create a simple login > test from cucumber features. The feature statement is: > > Given the user is not logged in > > The step definition for this is confounding me. In the > application_contr

[rspec-users] step definitons to check login

2008-12-16 Thread James Byrne
I am working with the authlogic gem and trying to create a simple login test from cucumber features. The feature statement is: Given the user is not logged in The step definition for this is confounding me. In the application_controller the authlogic tutorial recommends the following: private

Re: [rspec-users] [Cucumber] factor out non-user steps

2008-12-16 Thread Jonathan Linowes
On Dec 16, 2008, at 6:50 AM, aidy lewis wrote: Hi, I have a step that has been defined by the user Given /a logged in user/ {} Now in that step I have my own step (not defined by the business) of Given "all projects have been deleted" The second step needs to be included in the first Giv

Re: [rspec-users] [Cucumber] factor out non-user steps

2008-12-16 Thread Joseph Wilk
aidy lewis wrote: Hi, I have a step that has been defined by the user Given /a logged in user/ {} Now in that step I have my own step (not defined by the business) of Given "all projects have been deleted" This sounds like something that might be better suited to a Before / After. Befo

Re: [rspec-users] Cucumber fat client

2008-12-16 Thread mike.gaffney
Correct me if I'm wrong (and I probably missed something), but why do you and some others in this thread want users to actually edit a feature? That's going to wreck havoc with steps that won't match anymore, breaking features, and therefore making the client angry. WDYT? bartz > My thinking

[rspec-users] [Cucumber] factor out non-user steps

2008-12-16 Thread aidy lewis
Hi, I have a step that has been defined by the user Given /a logged in user/ {} Now in that step I have my own step (not defined by the business) of Given "all projects have been deleted" The second step needs to be included in the first Given /a logged in user/ do Given("all projects have

Re: [rspec-users] Cucumber fat client

2008-12-16 Thread Mischa Fierer
Also, if people are into this sort of thing, I would be up for helping build it. On Tue, Dec 16, 2008 at 3:17 AM, Mischa Fierer wrote: > A few other things... > > In the interface that I was describing, it would solve several problems to > have something like: > > Given I'm a client > When I fol

Re: [rspec-users] Cucumber fat client

2008-12-16 Thread Mischa Fierer
A few other things... In the interface that I was describing, it would solve several problems to have something like: Given I'm a client When I follow "new story" And I drag in "Given I am a Pet Owner" And I press "new action" And I select "When I follow" And I fill in "follows_what_link" with "B

Re: [rspec-users] Cucumber fat client

2008-12-16 Thread Mischa Fierer
I can maybe offer something here. *begin rambling* My team of 4 (2 coders, 2 biz people) has recently switched to using Pivotal Tracker, and we've been doing the following: 1) Figure out what we can do that will add value 2) Draw out the ui / changes on a whiteboard 3) Write out features & copy t

Re: [rspec-users] Cucumber fat client

2008-12-16 Thread Bart Zonneveld
On 16-dec-2008, at 9:42, Matt Wynne wrote: On 15 Dec 2008, at 12:53, Bart Zonneveld wrote: On 14-dec-2008, at 19:49, mike.gaffney wrote: Why not make a web client that manipulates git based projects in the background? I've been messing around with Grit and doing things like this lately

Re: [rspec-users] Reuse of Cucumber Features

2008-12-16 Thread Andrew Premdas
+lots :) Generally when we have problems with features its because we are trying to do to much at once. So in your case date entry is being complicated by different contexts, birth and incident. One of the tennents of BDD is to write the simplest thing you can to make you feature pass. I think ano

Re: [rspec-users] Cucumber fat client

2008-12-16 Thread Matt Wynne
On 15 Dec 2008, at 12:53, Bart Zonneveld wrote: On 14-dec-2008, at 19:49, mike.gaffney wrote: Why not make a web client that manipulates git based projects in the background? I've been messing around with Grit and doing things like this lately for http://rdocul.us a site I run and it is v