[rspec-users] How would I spec this? --Rails subscriptions

2009-04-20 Thread Colfer, Brian
I have a set of users And a set of things ... podcasts Users should get a page that shows all of the podcassts with a check box If they are subscribed then the check box is checked Users table has first_name, last_name, user_name Podcats table has podcast_name, description, url Subscriptions t

Re: [rspec-users] [cucumber, jruby] Same steps are being added multiple times?

2009-04-20 Thread aslak hellesoy
> Aslak, > Any chance you could join #cucumber on IRC tonight? Aslak > > I just ran the simple examples in your latest version of cucumber_java, and > it exposes the ambiguous steps problem that I'm seeing. > Before I could get it to run, I had to make four changes to the > cucumber-maven proje

Re: [rspec-users] Controller spec: testing that scope is set

2009-04-20 Thread Zach Dennis
On Mon, Apr 20, 2009 at 1:35 PM, Zach Dennis wrote: > On Sun, Apr 19, 2009 at 6:41 PM, Michael Schuerig wrote: >> On Sunday 19 April 2009, Zach Dennis wrote: >>> On Sun, Apr 19, 2009 at 2:09 PM, Michael Schuerig >> wrote: >>> > On Sunday 19 April 2009, Zach Dennis wrote: >>> >> On Sun, Apr 19, 2

Re: [rspec-users] Controller spec: testing that scope is set

2009-04-20 Thread Zach Dennis
On Mon, Apr 20, 2009 at 3:27 PM, Michael Schuerig wrote: > On Monday 20 April 2009, Zach Dennis wrote: >> On Sun, Apr 19, 2009 at 6:41 PM, Michael Schuerig > wrote: > [big snip] > >> I think I am starting to understand what you're after. You want to >> ensure the scope defined in your query_scope

Re: [rspec-users] [cucumber, jruby] Same steps are being added multiple times

2009-04-20 Thread John Goodsen
Aslak Hellesøy wrote: > On Tue, Apr 14, 2009 at 12:08 AM, John Goodsen > wrote: > >> OK, I'll reproduce in a simple example and create a ticket... >> >> > Excellent - I'll get to it ASAP I never got a ticket from any of you, but I have committed a fix: http://gith

Re: [rspec-users] Controller spec: testing that scope is set

2009-04-20 Thread Pat Maddox
On Mon, Apr 20, 2009 at 1:26 PM, Michael Schuerig wrote: > On Monday 20 April 2009, Pat Maddox wrote: >> In a functional test, create some records that will be in the scope >> and some that will be out of the scope, hit the page and make sure >> you only see the ones that you want.  I would either

Re: [rspec-users] problem using cucumber with selenium

2009-04-20 Thread roovo
2009/4/20 Barun Singh > found the answer via some more searching; it appears this is a bug with > webrat that hasn't been fixed yet; if i add > "selenium.wait_for_page_to_load(5)" > after the click_button command, things work fine. > I hit a similar problem and ended up putting the following in

Re: [rspec-users] [cucumber, jruby] Same steps are being added multiple t

2009-04-20 Thread aslak hellesoy
On Mon, Apr 20, 2009 at 9:45 PM, John Goodsen wrote: > Aslak, > > I just ran the simple examples in your latest version of cucumber_java, and > it still exposes the ambiguous steps problem that I'm seeing. Before I > could get it to run, I had to make some changes to the cucumber-maven > project

Re: [rspec-users] Controller spec: testing that scope is set

2009-04-20 Thread Michael Schuerig
On Monday 20 April 2009, Pat Maddox wrote: > In a functional test, create some records that will be in the scope > and some that will be out of the scope, hit the page and make sure > you only see the ones that you want. I would either do this with > cucumber, or write a controller spec and verify

Re: [rspec-users] [cucumber, jruby] Same steps are being added multiple t

2009-04-20 Thread John Goodsen
Aslak, I just ran the simple examples in your latest version of cucumber_java, and it still exposes the ambiguous steps problem that I'm seeing. Before I could get it to run, I had to make some changes to the cucumber-maven project: The class CucumberMojo has Java 6'isms in it and the client I'

Re: [rspec-users] Controller spec: testing that scope is set

2009-04-20 Thread Pat Maddox
In a functional test, create some records that will be in the scope and some that will be out of the scope, hit the page and make sure you only see the ones that you want. I would either do this with cucumber, or write a controller spec and verify that only certain records show in the the assigns

Re: [rspec-users] Depot app, Demeter's law and troubles cleanly specing

2009-04-20 Thread Pat Maddox
I wrote a blog post that may be helpful. http://www.patmaddox.com/blog/demeter-is-for-encapsulation Basically, when you have structural objects as in this case, demeter isn't useful. Luke Redpath wrote something called Demeter's Revenge which you might want to look at. I've not used it though so

Re: [rspec-users] Controller spec: testing that scope is set

2009-04-20 Thread Michael Schuerig
On Monday 20 April 2009, Zach Dennis wrote: > On Sun, Apr 19, 2009 at 6:41 PM, Michael Schuerig wrote: [big snip] > I think I am starting to understand what you're after. You want to > ensure the scope defined in your query_scope configuration block in > the controller is used to set the scope o

Re: [rspec-users] problem using cucumber with selenium

2009-04-20 Thread Barun Singh
found the answer via some more searching; it appears this is a bug with webrat that hasn't been fixed yet; if i add "selenium.wait_for_page_to_load(5)" after the click_button command, things work fine. i've opened up a new ticket in the webrat lighthouse acct. On Mon, Apr 20, 2009 at 3:10 PM, Ba

Re: [rspec-users] Cucmber: Mysql::Error: query: not connected: ROLLBACK

2009-04-20 Thread aslak hellesoy
On Mon, Apr 20, 2009 at 9:07 PM, Martin wrote: > Hi Aslkak, > I have been called many things, but never that. > > > Did you change your test.rb to use >> config.cache_classes = false >> ? >> > > you're right, I changed it because of rspec-server. Now I found the hint on > > http://wiki.github

[rspec-users] problem using cucumber with selenium

2009-04-20 Thread Barun Singh
I'm trying to use Cucumber with Selenium to test my app. I have a method called "login_as" defined as follows: def login_as(user, password) visit new_session_path fill_in "username", :with => user.username fill_in "password", :with => password click_button('Go') response.bo

Re: [rspec-users] Cucmber: Mysql::Error: query: not connected: ROLLBACK

2009-04-20 Thread Martin
Hi Aslkak, Did you change your test.rb to use config.cache_classes = false ? you're right, I changed it because of rspec-server. Now I found the hint on http://wiki.github.com/dchelimsky/rspec/spec_server-autospec-nearly-pure-bdd-joy that it breaks cucumber... Thanks, Martin _

[rspec-users] [cucumber, jruby] Same steps are being added multiple times?

2009-04-20 Thread John Goodsen
Aslak, I just ran the simple examples in your latest version of cucumber_java, and it exposes the ambiguous steps problem that I'm seeing. Before I could get it to run, I had to make four changes to the cucumber-maven project. The class CucumberMojo has Java 6'isms in it and the client I'm workin

Re: [rspec-users] Controller spec: testing that scope is set

2009-04-20 Thread Zach Dennis
On Sun, Apr 19, 2009 at 6:41 PM, Michael Schuerig wrote: > On Sunday 19 April 2009, Zach Dennis wrote: >> On Sun, Apr 19, 2009 at 2:09 PM, Michael Schuerig > wrote: >> > On Sunday 19 April 2009, Zach Dennis wrote: >> >> On Sun, Apr 19, 2009 at 12:27 PM, Michael Schuerig >> > >> > wrote: >> >> >

Re: [rspec-users] Appropriate adapter (Rails, Cucumber)

2009-04-20 Thread Joseph Wilk
Julian Leviston wrote: Hi All, I've got a bunch of tests written in cucumber, and they're all lovely... this is rails testing i'm doing by the way and now I'm coming to testing the javascript and AJAX parts of the app... and I've decided to plug in selenium... my issue is, I'd like to sele

[rspec-users] Appropriate adapter (Rails, Cucumber)

2009-04-20 Thread Julian Leviston
Hi All, I've got a bunch of tests written in cucumber, and they're all lovely... this is rails testing i'm doing by the way and now I'm coming to testing the javascript and AJAX parts of the app... and I've decided to plug in selenium... my issue is, I'd like to select which adapter to

Re: [rspec-users] Controller spec: testing that scope is set

2009-04-20 Thread Tom Stuart
On 20 Apr 2009, at 02:57, Michael Schuerig wrote: I'd rather check that a particular scope is in effect for a call to #find. Just as I said. ;-) As is always the case with spec'ing Rails, I don't know which level of abstraction is the right one to check, but it seems like what you're asking