[rspec-users] rake features and cucumber feature/name not producing same result

2008-11-04 Thread Mikel Lindsaar
Hi all. If I run rake features or cucumber features/* I get one failing FIT scenario in one of my features. If I then run that feature that contains the FIT table with the failing scenario manually, it passes. I run it again with rake features or cucumber features/* it fails, run individually, it

Re: [rspec-users] mocking named_scope utilization

2008-11-04 Thread Chris Flipse
Right. Example passed a block, but stub_chains didn't call it. Pretend there's a yield(hades) in there somewhere. On Tue, Nov 4, 2008 at 10:26 PM, Chris Flipse <[EMAIL PROTECTED]> wrote: > I dunno ... creating a bunch of joining methods seems to be an awfully > disjoint way to deal with somethi

Re: [rspec-users] how to avoid tests removing data that my migrations put in?

2008-11-04 Thread Greg Hauptmann
so is the concept to build up all seed data creation in one place/method, & then for the rake spec case run this in via the "test" environment.rb file? But then if you were to use rake:migrate to drop back a couple of version you might be in a spot of bother? (ie newest seed data not then tied to

Re: [rspec-users] mocking named_scope utilization

2008-11-04 Thread Chris Flipse
I dunno ... creating a bunch of joining methods seems to be an awfully disjoint way to deal with something that is, admittedly, designed to laugh in the face of the Law of Demeter. I've been handling chains through some heavy use of null_object stubs ... but, I've been doing that sort of manually.

Re: [rspec-users] how to avoid tests removing data that my migrations put in?

2008-11-04 Thread Mark Wilden
On Tue, Nov 4, 2008 at 4:56 PM, Pat Maddox <[EMAIL PROTECTED]> wrote: > Then it becomes a simple matter of SeedData.build_data > to kick off the whole deal. > That makes sense. ///ark ___ rspec-users mailing list rspec-users@rubyforge.org http://rubyf

Re: [rspec-users] how to avoid tests removing data that my migrations put in?

2008-11-04 Thread Pat Maddox
"Mark Wilden" <[EMAIL PROTECTED]> writes: > On Tue, Nov 4, 2008 at 4:26 PM, Pat Maddox <[EMAIL PROTECTED]> wrote: > > aslak's right though in that case too. In your spec_helper, just loop > over the tables and delete everything, then insert the seed data you > want, and it should be g

Re: [rspec-users] NoMethodError dependent on spec order

2008-11-04 Thread Jim Lindley
I have created an updated example, the issue I am seeing happens when any method has been included into a class from a module. It doesn't get re-added like methods that have been inherited or added directly to a class are. http://gist.github.com/22159 I've updated the ticket as well, but I think

[rspec-users] Problem with namespaced controller, form_for, and view specs

2008-11-04 Thread Jesse Clark
Hello, I have encountered a problem with the view tests involving a form_for tag that references a namespaced controller. My controller is: class Admin::AuthenticationProvidersController < ApplicationController The form_for tag from /app/views/admin/authentication_providers/ edit.html.erb:

Re: [rspec-users] how to avoid tests removing data that my migrations put in?

2008-11-04 Thread Mark Wilden
On Tue, Nov 4, 2008 at 4:26 PM, Pat Maddox <[EMAIL PROTECTED]> wrote: > > aslak's right though in that case too. In your spec_helper, just loop > over the tables and delete everything, then insert the seed data you > want, and it should be good to go. > But then Ashley's comment applies: you've

Re: [rspec-users] Problems stubbing @controller.stub!(:send)

2008-11-04 Thread David Schmidt
On Nov 4, 2008, at 1:53 PM, Pat Maddox wrote: David Schmidt <[EMAIL PROTECTED]> writes: In one of my controller tests I'm testing a method which uses self.send() to do some pre-processing if that private method name is defined: # If this task requires some additional preperation t

Re: [rspec-users] how to avoid tests removing data that my migrations put in?

2008-11-04 Thread Pat Maddox
Ben Mabey <[EMAIL PROTECTED]> writes: > Aslak Hellesøy wrote: >> >> >> Sent from my iPhone >> >> On 5. nov.. 2008, at 00.05, Pat Maddox <[EMAIL PROTECTED]> wrote: >> >>> "Greg Hauptmann" <[EMAIL PROTECTED]> writes: >>> hi, I have an issue in that I have some reference data my migrat

Re: [rspec-users] Caboosers drop RSpec

2008-11-04 Thread aslak hellesoy
On Wed, Nov 5, 2008 at 1:01 AM, Ashley Moran <[EMAIL PROTECTED]> wrote: > > On Nov 04, 2008, at 11:09 pm, Dr Nic wrote: > >> On Nov 5, 1:55 am, "Luis Lavena" <[EMAIL PROTECTED]> wrote: >>> >>> Given a problem I have with RSpec >>> And I post to the mailing list >>> When noone answer my post >>> And

Re: [rspec-users] Caboosers drop RSpec

2008-11-04 Thread Andrew Brown
Did this person the mailing list first? On 4-Nov-08, at 7:01 PM, Ashley Moran wrote: On Nov 04, 2008, at 11:09 pm, Dr Nic wrote: On Nov 5, 1:55 am, "Luis Lavena" <[EMAIL PROTECTED]> wrote: Given a problem I have with RSpec And I post to the mailing list When noone answer my post And has be

Re: [rspec-users] Cucumber: Why rake features needs to call db:test:prepare?

2008-11-04 Thread Mark Wilden
On Tue, Nov 4, 2008 at 3:25 PM, aslak hellesoy <[EMAIL PROTECTED]>wrote: > db:test:prepare is a shortcut for running all the migrations from the > first to the last. > Not quite. db:test:prepare just copies the schema from the development database to the test database. It aborts if there are any

Re: [rspec-users] Caboosers drop RSpec

2008-11-04 Thread Ashley Moran
On Nov 04, 2008, at 11:09 pm, Dr Nic wrote: On Nov 5, 1:55 am, "Luis Lavena" <[EMAIL PROTECTED]> wrote: Given a problem I have with RSpec And I post to the mailing list When noone answer my post And has been N days since I posted Then I start whining in my blog about it I'm still learning th

Re: [rspec-users] how to avoid tests removing data that my migrations put in?

2008-11-04 Thread Ben Mabey
Aslak Hellesøy wrote: Sent from my iPhone On 5. nov.. 2008, at 00.05, Pat Maddox <[EMAIL PROTECTED]> wrote: "Greg Hauptmann" <[EMAIL PROTECTED]> writes: hi, I have an issue in that I have some reference data my migrations run in. However when running "rake spec" it seems to remove the da

Re: [rspec-users] how to avoid tests removing data that my migrations put in?

2008-11-04 Thread Aslak Hellesøy
Sent from my iPhone On 5. nov.. 2008, at 00.05, Pat Maddox <[EMAIL PROTECTED]> wrote: "Greg Hauptmann" <[EMAIL PROTECTED]> writes: hi, I have an issue in that I have some reference data my migrations run in. However when running "rake spec" it seems to remove the data in the test database

Re: [rspec-users] mocking named_scope utilization

2008-11-04 Thread Pat Maddox
Fernando Perez <[EMAIL PROTECTED]> writes: > Therefore a workaround is to define an instance method: > -- > class Thing > def self.method1_and_method2(arg) > method1(arg).method2 > end > end I'm inclined to call this an improvement rather than a workaround :) Pat

Re: [rspec-users] Cucumber: Why rake features needs to call db:test:prepare?

2008-11-04 Thread Ben Mabey
Fernando Perez wrote: I am missing something here. Using PostgreSQL, when I remove this line from the rake task, I don't see the DB being populated although I do invoke create! on some models. When I use debug(@some_instance) I see its id gets increased, so there is definitely some data already

Re: [rspec-users] mocking named_scope utilization

2008-11-04 Thread Fernando Perez
Here you go: It's not easy to test for the following named_scopes: -- Thing.method1(@current_user).method2.method3 :page => params[:page] -- I tried: -- Thing.should_receive(:method1).. Thing.should_receive(:method2).. Thing.should_receive(:method3) -- But testing for these three method calls did

Re: [rspec-users] Cucumber: Why rake features needs to call db:test:prepare?

2008-11-04 Thread aslak hellesoy
On Wed, Nov 5, 2008 at 12:16 AM, Fernando Perez <[EMAIL PROTECTED]> wrote: > I am missing something here. Using PostgreSQL, when I remove this line > from the rake task, I don't see the DB being populated although I do > invoke create! on some models. > Vanilla Rails test:* tasks do the same, as d

[rspec-users] Cucumber: Why rake features needs to call db:test:prepare?

2008-11-04 Thread Fernando Perez
I am missing something here. Using PostgreSQL, when I remove this line from the rake task, I don't see the DB being populated although I do invoke create! on some models. When I use debug(@some_instance) I see its id gets increased, so there is definitely some data already in the DB. Why can't I

Re: [rspec-users] how to avoid tests removing data that my migrations put in?

2008-11-04 Thread Pat Maddox
"Greg Hauptmann" <[EMAIL PROTECTED]> writes: > hi, > > I have an issue in that I have some reference data my migrations run > in. However when running "rake spec" it seems to remove the data in > the test database up front. > > What do you recommend to workaround this issue? > > Thanks > Greg > _

Re: [rspec-users] Caboosers drop RSpec

2008-11-04 Thread Dr Nic
On Nov 5, 1:55 am, "Luis Lavena" <[EMAIL PROTECTED]> wrote: > Given a problem I have with RSpec > And I post to the mailing list > When noone answer my post > And has been N days since I posted > Then I start whining in my blog about it I'm still learning the ways of cucumber, though I think this

Re: [rspec-users] RSpec and PostgreSQL not playing nicely together

2008-11-04 Thread Mark Wilden
On Tue, Nov 4, 2008 at 2:54 PM, Ashley Moran <[EMAIL PROTECTED]>wrote: > > On Nov 04, 2008, at 10:15 pm, Mark Wilden wrote: > > I think it's actually simpler to do 'rake db:test:prepare' rather than >> migrate the test database. Migrations can be a pain when you've only got one >> database to wor

Re: [rspec-users] RSpec and PostgreSQL not playing nicely together

2008-11-04 Thread Ashley Moran
On Nov 04, 2008, at 10:15 pm, Mark Wilden wrote: I think it's actually simpler to do 'rake db:test:prepare' rather than migrate the test database. Migrations can be a pain when you've only got one database to worry about, much less two. The db:test:prepare task extracts the schema from the

Re: [rspec-users] how to avoid tests removing data that my migrations put in?

2008-11-04 Thread Mark Wilden
On Tue, Nov 4, 2008 at 2:45 PM, Greg Hauptmann < [EMAIL PROTECTED]> wrote: > > I have an issue in that I have some reference data my migrations run > in. However when running "rake spec" it seems to remove the data in > the test database up front. > > What do you recommend to workaround this issu

[rspec-users] how to avoid tests removing data that my migrations put in?

2008-11-04 Thread Greg Hauptmann
hi, I have an issue in that I have some reference data my migrations run in. However when running "rake spec" it seems to remove the data in the test database up front. What do you recommend to workaround this issue? Thanks Greg ___ rspec-users mailin

Re: [rspec-users] RSpec and PostgreSQL not playing nicely together

2008-11-04 Thread Mark Wilden
On Tue, Nov 4, 2008 at 1:10 PM, Fernando Perez <[EMAIL PROTECTED]> wrote: > Thanks Ashley. And I am sure I will forget to run migration for the test > environment each time I make changes to it. I will create a dumb script > that looks like: > -- > RAILS_ENV=production rake db:migrate > RAILS_ENV=

Re: [rspec-users] mocking named_scope utilization

2008-11-04 Thread Matt Wynne
On 4 Nov 2008, at 21:48, Fernando Perez wrote: This trick to spec a named_scope method works very well. And it cleans up the chain mess in the controller. Which trick is that? Sorry if this sounds a bit patronising, but it does help if you quote the relevant bits of a post you're replying t

Re: [rspec-users] Problems stubbing @controller.stub!(:send)

2008-11-04 Thread Pat Maddox
David Schmidt <[EMAIL PROTECTED]> writes: > In one of my controller tests I'm testing a method which uses > self.send() to do some pre-processing if that > private method name is defined: > > # If this task requires some additional preperation then > create a > # private me

Re: [rspec-users] Caboosers drop RSpec

2008-11-04 Thread Pat Maddox
Ben Mabey <[EMAIL PROTECTED]> writes: > Pat Maddox wrote: >> Fernando Perez <[EMAIL PROTECTED]> writes: >> >> >>> As a starter, can someone tell me if the specs defined in >>> restful_authentication are clever? Can I learn from them? >>> >>> Because right now I find them overwhelming, complicat

Re: [rspec-users] mocking named_scope utilization

2008-11-04 Thread Fernando Perez
This trick to spec a named_scope method works very well. And it cleans up the chain mess in the controller. -- Posted via http://www.ruby-forum.com/. ___ rspec-users mailing list rspec-users@rubyforge.org http://rubyforge.org/mailman/listinfo/rspec-user

Re: [rspec-users] Caboosers drop RSpec

2008-11-04 Thread Ben Mabey
Pat Maddox wrote: Fernando Perez <[EMAIL PROTECTED]> writes: As a starter, can someone tell me if the specs defined in restful_authentication are clever? Can I learn from them? Because right now I find them overwhelming, complicated, over-testing, etc. I don't even use restful_auth

Re: [rspec-users] Unable to stub a class method in a before_filter

2008-11-04 Thread Scott Taylor
On Nov 4, 2008, at 3:46 PM, Fernando Perez wrote: Are the docs on mock outdated? I sometimes see mock_model, and sometimes mock. Which one should be used? mock_model is for ActiveRecord objects. it's just a mock() call with a random id stub set, and a :new_record? => false Scott _

Re: [rspec-users] Caboosers drop RSpec

2008-11-04 Thread Pat Maddox
Fernando Perez <[EMAIL PROTECTED]> writes: > As a starter, can someone tell me if the specs defined in > restful_authentication are clever? Can I learn from them? > > Because right now I find them overwhelming, complicated, over-testing, > etc. I don't even use restful_auth, precisely because I

[rspec-users] Problems stubbing @controller.stub!(:send)

2008-11-04 Thread David Schmidt
In one of my controller tests I'm testing a method which uses self.send() to do some pre-processing if that private method name is defined: # If this task requires some additional preperation then create a # private method below with the same name as the task_type

Re: [rspec-users] restful_auth and good rspec examples (was: Caboosers drop RSpec)

2008-11-04 Thread Fernando Perez
Thank you Ben, my doubts about restful_auth specs have been confirmed. I think having a good solid Rails app, with well written specs to learn from is what prevents its adoption. I myself have got pissed a thousand times not knowing how to write a spec for a very simple piece of code. So I simp

Re: [rspec-users] restful_auth and good rspec examples (was: Caboosers drop RSpec)

2008-11-04 Thread Matt Wynne
On 4 Nov 2008, at 21:05, Fernando Perez wrote: I would like to know: does anyone in this mailing-list actually never ever writes a single line of code before having written its spec(s)? In other words: do you fully comply to TDD or do you sometimes break the rules? As a friend of mine said r

Re: [rspec-users] Unable to stub a class method in a before_filter

2008-11-04 Thread Fernando Perez
Ok I get it. I was wondering why mock_model was not showing up in rspec's rdoc. Thanks for the clarification. -- Posted via http://www.ruby-forum.com/. ___ rspec-users mailing list rspec-users@rubyforge.org http://rubyforge.org/mailman/listinfo/rspec-us

Re: [rspec-users] RSpec and PostgreSQL not playing nicely together

2008-11-04 Thread Fernando Perez
Thanks Ashley. And I am sure I will forget to run migration for the test environment each time I make changes to it. I will create a dumb script that looks like: -- RAILS_ENV=production rake db:migrate RAILS_ENV=test rake db:migrate ... It's not DRY but it's so easy to read with so little lines

Re: [rspec-users] restful_auth and good rspec examples (was: Caboosers drop RSpec)

2008-11-04 Thread Jim Gay
On Nov 4, 2008, at 3:01 PM, Ben Mabey wrote: Fernando Perez wrote: As a starter, can someone tell me if the specs defined in restful_authentication are clever? Can I learn from them? Please don't look at restful_auth as an example on how to use rspec examples and/or the story runner. T

Re: [rspec-users] Unable to stub a class method in a before_filter

2008-11-04 Thread Fernando Perez
Crap! I was stubbing Product, instead of Site! It all works now. Matt's typo put me on the track! But I will definitely use the trick Spec::Runner.configure do |config|... to avoid having to type this stub in all my files. Thanks. -- Posted via http://www.ruby-forum.com/.

Re: [rspec-users] Unable to stub a class method in a before_filter

2008-11-04 Thread Matt Wynne
On 4 Nov 2008, at 20:46, Fernando Perez wrote: Are the docs on mock outdated? I sometimes see mock_model, and sometimes mock. Which one should be used? For mock_model, you need to look at the rspec-rails gem, which is a separate library. You actually have three choices when mocking an Ac

Re: [rspec-users] Unable to stub a class method in a before_filter

2008-11-04 Thread Fernando Perez
Are the docs on mock outdated? I sometimes see mock_model, and sometimes mock. Which one should be used? -- Posted via http://www.ruby-forum.com/. ___ rspec-users mailing list rspec-users@rubyforge.org http://rubyforge.org/mailman/listinfo/rspec-users

Re: [rspec-users] Testing a wizard with Cucumber

2008-11-04 Thread Joseph Wilk
Its still there in source. You can read why people felt calling steps from steps was a better approach here: http://rspec.lighthouseapp.com/projects/16211/tickets/3-create-givenscenario-dependency-accross-feature-files -- Joseph Wilk http://www.joesniff.co.uk On Tue, Nov 4, 2008 at 7:28 PM, Ben

Re: [rspec-users] Unable to stub a class method in a before_filter

2008-11-04 Thread Fernando Perez
> That work? It could. But in such case, how will I test my before_filter independently? My real problem is to stub the find_by_domain_name instance method. -- Posted via http://www.ruby-forum.com/. ___ rspec-users mailing list rspec-users@rubyforge.

Re: [rspec-users] Can I do foo.should (be_nil || be_empty) in rspec

2008-11-04 Thread Ashley Moran
On Nov 04, 2008, at 7:24 pm, Zach Dennis wrote: There are a few obstacles that it would have to overcome. As-is I don't think that will work. If you file a ticket I'll comment there as to why I think that. :) I've filed a ticket[1]. Unleash your scepticism, Zach! :) Ashley [1] http://rs

Re: [rspec-users] Testing a wizard with Cucumber

2008-11-04 Thread Ashley Moran
On Nov 04, 2008, at 7:28 pm, Ben Mabey wrote: Oh really? Hmm.. I assumed it was still there. :) Search for Aslak's comments, I'm pretty sure it will be pulled in Cucumber 0.3. Calling steps is much neater from inside other steps is much neater, and doesn't produce the visible step-expl

Re: [rspec-users] restful_auth and good rspec examples (was: Caboosers drop RSpec)

2008-11-04 Thread Ben Mabey
Fernando Perez wrote: As a starter, can someone tell me if the specs defined in restful_authentication are clever? Can I learn from them? Please don't look at restful_auth as an example on how to use rspec examples and/or the story runner. The stories in particular are very brittle. Becau

Re: [rspec-users] Can I do foo.should (be_nil || be_empty) in rspec

2008-11-04 Thread David Chelimsky
On Tue, Nov 4, 2008 at 1:47 PM, Pat Maddox <[EMAIL PROTECTED]> wrote: > "David Chelimsky" <[EMAIL PROTECTED]> writes: > >> Alternatively, you could add a new method: >> >> def_matcher > > I dig this. FYI - I was talking off-line (on line, really, but outside this list) to wycats and he's got some

Re: [rspec-users] Unable to stub a class method in a before_filter

2008-11-04 Thread Matt Wynne
On 4 Nov 2008, at 19:38, Fernando Perez wrote: Here is my spec: -- describe Admin::ProductsController, "A visitor wants to access admin/products" do before(:each) do @product = mock_model(Product, :traffic_available => 0) Product.stub!(:find_by_domain_name).and_return(@product) Should t

Re: [rspec-users] Can I do foo.should (be_nil || be_empty) in rspec

2008-11-04 Thread Pat Maddox
"David Chelimsky" <[EMAIL PROTECTED]> writes: > Alternatively, you could add a new method: > > def_matcher I dig this. Pat ___ rspec-users mailing list rspec-users@rubyforge.org http://rubyforge.org/mailman/listinfo/rspec-users

Re: [rspec-users] Unable to stub a class method in a before_filter

2008-11-04 Thread David Chelimsky
On Tue, Nov 4, 2008 at 1:38 PM, Fernando Perez <[EMAIL PROTECTED]> wrote: > Here is my spec: > -- > describe Admin::ProductsController, "A visitor wants to access > admin/products" do > > before(:each) do >@product = mock_model(Product, :traffic_available => 0) >Product.stub!(:find_by_doma

Re: [rspec-users] Caboosers drop RSpec

2008-11-04 Thread Fernando Perez
As a starter, can someone tell me if the specs defined in restful_authentication are clever? Can I learn from them? Because right now I find them overwhelming, complicated, over-testing, etc. Does anyone know of a good app with specs I could learn from? It always makes me laugh to think about

[rspec-users] Unable to stub a class method in a before_filter

2008-11-04 Thread Fernando Perez
Here is my spec: -- describe Admin::ProductsController, "A visitor wants to access admin/products" do before(:each) do @product = mock_model(Product, :traffic_available => 0) Product.stub!(:find_by_domain_name).and_return(@product) end it "should redirect to login path" do get :

Re: [rspec-users] Can I do foo.should (be_nil || be_empty) in rspec

2008-11-04 Thread Zach Dennis
On Tue, Nov 4, 2008 at 2:14 PM, Ashley Moran <[EMAIL PROTECTED]> wrote: > > On Nov 04, 2008, at 5:07 pm, David Chelimsky wrote: > >> FYI - if you REALLY want to match against either, it's pretty easy to >> do w/ simple matcher: >> >> def be_nil_or_empty >> simple_matcher "nil? or empty? to return

Re: [rspec-users] RSpec and PostgreSQL not playing nicely together

2008-11-04 Thread Ashley Moran
On Nov 04, 2008, at 5:07 pm, Fernando Perez wrote: Doh! I forgot to run the migrations in the newly created DB. Hi Fernando I used to do this all the time, so I made a db:migrate:all task[1] that means you don't have to remember which version which DB is on. Mine is for Merb, but I can

Re: [rspec-users] Testing a wizard with Cucumber

2008-11-04 Thread Ben Mabey
Ashley Moran wrote: On Nov 04, 2008, at 6:18 pm, Matt Wynne wrote: You could also use GivenScenario. Dude, that is s "Story Runner". And s deprecated too, right? Oh really? Hmm.. I assumed it was still there. :) -Ben ___ rspec-users

Re: [rspec-users] Can I do foo.should (be_nil || be_empty) in rspec

2008-11-04 Thread David Chelimsky
On Tue, Nov 4, 2008 at 1:14 PM, Ashley Moran <[EMAIL PROTECTED]> wrote: > > On Nov 04, 2008, at 5:07 pm, David Chelimsky wrote: > >> FYI - if you REALLY want to match against either, it's pretty easy to >> do w/ simple matcher: >> >> def be_nil_or_empty >> simple_matcher "nil? or empty? to return

Re: [rspec-users] Testing a wizard with Cucumber

2008-11-04 Thread Ashley Moran
On Nov 04, 2008, at 6:18 pm, Matt Wynne wrote: You could also use GivenScenario. Dude, that is s "Story Runner". And s deprecated too, right? -- http://www.patchspace.co.uk/ http://aviewfromafar.net/ ___ rspec-users mailing list rspec-u

Re: [rspec-users] Can I do foo.should (be_nil || be_empty) in rspec

2008-11-04 Thread Ashley Moran
On Nov 04, 2008, at 5:07 pm, David Chelimsky wrote: FYI - if you REALLY want to match against either, it's pretty easy to do w/ simple matcher: def be_nil_or_empty simple_matcher "nil? or empty? to return true" do |actual| actual.nil? || actual.empty? end end Wow, I completely forgot a

Re: [rspec-users] Testing a wizard with Cucumber

2008-11-04 Thread Matt Wynne
On 4 Nov 2008, at 17:42, Ben Mabey wrote: Andrew Premdas wrote: Thanks Matt, just what I was looking for :) Andrew You could also use GivenScenario. Dude, that is s "Story Runner". ;) ___ rspec-users mailing list rspec-users@rubyforge.org h

Re: [rspec-users] Testing a wizard with Cucumber

2008-11-04 Thread Ben Mabey
Andrew Premdas wrote: Thanks Matt, just what I was looking for :) Andrew You could also use GivenScenario. It works like this: Scenario: State A Given I'm ... And I'm ... When I ... Then I should see And I at state A Scenario: Test A to B GivenScenario A When I ... Or you could do a c

Re: [rspec-users] Caboosers drop RSpec

2008-11-04 Thread Pat Maddox
"Stephen Eley" <[EMAIL PROTECTED]> writes: > The list is pretty helpful, sure, but the > documentation _could_ stand for a lot of improvement. Agree 100%. Got a git repo I can pull from? :) Pat ___ rspec-users mailing list rspec-users@rubyforge.org htt

Re: [rspec-users] Caboosers drop RSpec

2008-11-04 Thread Pat Maddox
Fernando Perez <[EMAIL PROTECTED]> writes: >> A poor craftsman blames his tools. >> > And the poor toolmaker blames the craftsman for being too stupid to > understand how to use his tools. > > You say these guys should have come over and posted to this mailing-list > or submitted bugs. But when

Re: [rspec-users] Caboosers drop RSpec

2008-11-04 Thread Matt Wynne
On 4 Nov 2008, at 17:32, court3nay wrote: upgrade. It might well be bugs in Rails not rSpec, but if the only thing that changed was rSpec, well, you see my problem. In my mind rspec has a long history of breaking things between versions. If this is a common complaint, do we maybe need some be

Re: [rspec-users] RSpec and PostgreSQL not playing nicely together

2008-11-04 Thread Pat Maddox
Fernando Perez <[EMAIL PROTECTED]> writes: > Here is a very simple spec: > -- > require File.expand_path(File.dirname(__FILE__) + '/../spec_helper') > > describe Product, "The Product model" do > > describe "When a new blank product object gets created" do > before(:each) do > @product

Re: [rspec-users] Caboosers drop RSpec

2008-11-04 Thread court3nay
On Nov 4, 5:25 am, "aslak hellesoy" <[EMAIL PROTECTED]> wrote: > On Tue, Nov 4, 2008 at 10:39 AM, Tom Stuart <[EMAIL PROTECTED]> wrote: > > Hi, > > > Any responses to > >http://blog.caboo.se/articles/2008/11/4/we-ve-stopped-using-rspec? How much > > of this is due to legitimate bugs/problems versus

Re: [rspec-users] Caboosers drop RSpec

2008-11-04 Thread Luis Lavena
On Tue, Nov 4, 2008 at 1:47 PM, Mike Gunderloy <[EMAIL PROTECTED]> wrote: > On Nov 4, 2008, at 10:24 AM, Luis Lavena wrote: > >> Neither Rails was the one with best documentation (which btw I wonder >> what happened with the caboose documentation project they collected >> 12K, anyway). > > Tangenti

Re: [rspec-users] Caboosers drop RSpec

2008-11-04 Thread Mike Gunderloy
On Nov 4, 2008, at 10:24 AM, Luis Lavena wrote: Neither Rails was the one with best documentation (which btw I wonder what happened with the caboose documentation project they collected 12K, anyway). Tangential to this discussion, but anyhow: some of that money is going into the Rails Guides

Re: [rspec-users] RSpec and PostgreSQL not playing nicely together

2008-11-04 Thread Mark Wilden
> > On Tue, Nov 4, 2008 at 11:33 AM, Fernando Perez <[EMAIL PROTECTED]> > wrote: > > > @product = Product.new > > > PGError: ERROR: relation "products" does not exist > > > I don't understand why RSpec is trying to look for some kind of > > relation. In the spec I am simply calling Prod

Re: [rspec-users] Can I do foo.should (be_nil || be_empty) in rspec

2008-11-04 Thread David Chelimsky
On Tue, Nov 4, 2008 at 9:29 AM, Pat Maddox <[EMAIL PROTECTED]> wrote: > "Andrew Premdas" <[EMAIL PROTECTED]> writes: > >> General case I'm thinking about is just testing that something should be one >> thing or another >> >>e.g x.should be(foo || bar) >> >> Haven't got a specific example at th

Re: [rspec-users] RSpec and PostgreSQL not playing nicely together

2008-11-04 Thread Fernando Perez
Doh! I forgot to run the migrations in the newly created DB. Thanks. -- Posted via http://www.ruby-forum.com/. ___ rspec-users mailing list rspec-users@rubyforge.org http://rubyforge.org/mailman/listinfo/rspec-users

Re: [rspec-users] Can I do foo.should (be_nil || be_empty) in rspec

2008-11-04 Thread Andrew Premdas
Oh I was definitely into theoretical speculation here :) - haven't got a particular case at the moment 2008/11/4 Zach Dennis <[EMAIL PROTECTED]> > On Tue, Nov 4, 2008 at 11:36 AM, Andrew Premdas <[EMAIL PROTECTED]> > wrote: > > Ok I see. I was approaching this more from the syntax that my stories

Re: [rspec-users] Testing a wizard with Cucumber

2008-11-04 Thread Andrew Premdas
Thanks Matt, just what I was looking for :) Andrew 2008/11/4 Matt Wynne <[EMAIL PROTECTED]> > On 4 Nov 2008, at 15:41, Andrew Premdas wrote: > > Assuming you have a multi-step wizard like thing, with lots of different >> states and paths through it. What approach would your use to write a featur

Re: [rspec-users] Better RSpec newbie documentation (was: Caboosers drop RSpec)

2008-11-04 Thread Zach Dennis
On Tue, Nov 4, 2008 at 11:45 AM, Bart Zonneveld <[EMAIL PROTECTED]> wrote: > > On 4-nov-2008, at 17:20, Matt Wynne wrote: > >> On 4 Nov 2008, at 16:09, Stephen Eley wrote: Pat, Ashley, David and Aslak give quite share of their time answering those emails, do a search and you will fin

Re: [rspec-users] RSpec and PostgreSQL not playing nicely together

2008-11-04 Thread Zach Dennis
On Tue, Nov 4, 2008 at 11:33 AM, Fernando Perez <[EMAIL PROTECTED]> wrote: > Here is a very simple spec: > -- > require File.expand_path(File.dirname(__FILE__) + '/../spec_helper') > > describe Product, "The Product model" do > > describe "When a new blank product object gets created" do >befo

Re: [rspec-users] Better RSpec newbie documentation (was: Caboosers drop RSpec)

2008-11-04 Thread Bart Zonneveld
On 4-nov-2008, at 17:20, Matt Wynne wrote: On 4 Nov 2008, at 16:09, Stephen Eley wrote: Pat, Ashley, David and Aslak give quite share of their time answering those emails, do a search and you will find out. That's not a replacement for good documentation. You have to have a certain ground

Re: [rspec-users] Can I do foo.should (be_nil || be_empty) in rspec

2008-11-04 Thread Zach Dennis
On Tue, Nov 4, 2008 at 11:36 AM, Andrew Premdas <[EMAIL PROTECTED]> wrote: > Ok I see. I was approaching this more from the syntax that my stories can > express rather than what my code does. However from these replies and a > re-read of the cucumber wiki I can see that any step that requires the >

Re: [rspec-users] Can I do foo.should (be_nil || be_empty) in rspec

2008-11-04 Thread Andrew Premdas
Ok I see. I was approaching this more from the syntax that my stories can express rather than what my code does. However from these replies and a re-read of the cucumber wiki I can see that any step that requires the (foo||bar) construct is by definition a conjunction and can be broken into smaller

[rspec-users] RSpec and PostgreSQL not playing nicely together

2008-11-04 Thread Fernando Perez
Here is a very simple spec: -- require File.expand_path(File.dirname(__FILE__) + '/../spec_helper') describe Product, "The Product model" do describe "When a new blank product object gets created" do before(:each) do @product = Product.new end it "should not be valid" do

Re: [rspec-users] Testing a wizard with Cucumber

2008-11-04 Thread Matt Wynne
On 4 Nov 2008, at 15:41, Andrew Premdas wrote: Assuming you have a multi-step wizard like thing, with lots of different states and paths through it. What approach would your use to write a feature for it? What I want to do is do the separate states and then reuse these things in more comple

Re: [rspec-users] Better RSpec newbie documentation (was: Caboosers drop RSpec)

2008-11-04 Thread Matt Wynne
On 4 Nov 2008, at 16:09, Stephen Eley wrote: Pat, Ashley, David and Aslak give quite share of their time answering those emails, do a search and you will find out. That's not a replacement for good documentation. You have to have a certain grounding before you can even figure out where to go a

Re: [rspec-users] Caboosers drop RSpec

2008-11-04 Thread Luis Lavena
On Tue, Nov 4, 2008 at 1:09 PM, Stephen Eley <[EMAIL PROTECTED]> wrote: > On Tue, Nov 4, 2008 at 9:55 AM, Luis Lavena <[EMAIL PROTECTED]> wrote: >> On Tue, Nov 4, 2008 at 12:32 PM, Fernando Perez <[EMAIL PROTECTED]> wrote: >>> >>> But when I read the posts here, most of the time, >>> when someone h

Re: [rspec-users] Can I do foo.should (be_nil || be_empty) in rspec

2008-11-04 Thread Andrew Premdas
Ashley, Thanks for your time on this, the reply does make sense, and I can see from an OO point of view that any particular object being (foo||bar) is equivalent to that object being baz. However with the dynamic nature of ruby we often don't know what object we are going to be dealing with in our

Re: [rspec-users] Caboosers drop RSpec

2008-11-04 Thread Stephen Eley
On Tue, Nov 4, 2008 at 9:55 AM, Luis Lavena <[EMAIL PROTECTED]> wrote: > On Tue, Nov 4, 2008 at 12:32 PM, Fernando Perez <[EMAIL PROTECTED]> wrote: >> >> But when I read the posts here, most of the time, >> when someone has a problem he gets pointed to the unfriendly >> documentation pages or worse

Re: [rspec-users] Caboosers drop RSpec

2008-11-04 Thread Nick Hoffman
On 2008-11-04, at 10:32, Fernando Perez wrote: You say these guys should have come over and posted to this mailing- list or submitted bugs. But when I read the posts here, most of the time, when someone has a problem he gets pointed to the unfriendly documentation pages or worse, the very thin d

Re: [rspec-users] NoMethodError dependent on spec order

2008-11-04 Thread Jim Lindley
> Hey Jim - I think this is related to this: > > http://rspec.lighthouseapp.com/projects/5645/tickets/589 > > Would you kindly add your comments to that ticket? > I updated the ticket, thanks David! I also changed the title to something more general then the existing case implied. It's not just Ke

Re: [rspec-users] Caboosers drop RSpec

2008-11-04 Thread Luis Lavena
On Tue, Nov 4, 2008 at 12:32 PM, Fernando Perez <[EMAIL PROTECTED]> wrote: >> A poor craftsman blames his tools. >> > And the poor toolmaker blames the craftsman for being too stupid to > understand how to use his tools. > > You say these guys should have come over and posted to this mailing-list >

Re: [rspec-users] Caboosers drop RSpec

2008-11-04 Thread Fernando Perez
> A poor craftsman blames his tools. > And the poor toolmaker blames the craftsman for being too stupid to understand how to use his tools. You say these guys should have come over and posted to this mailing-list or submitted bugs. But when I read the posts here, most of the time, when someone

[rspec-users] Testing a wizard with Cucumber

2008-11-04 Thread Andrew Premdas
Assuming you have a multi-step wizard like thing, with lots of different states and paths through it. What approach would your use to write a feature for it? What I want to do is do the separate states and then reuse these things in more complex scenarios that cover paths. For example Scenario: Sta

Re: [rspec-users] NoMethodError dependent on spec order

2008-11-04 Thread David Chelimsky
On Tue, Nov 4, 2008 at 9:32 AM, Jim Lindley <[EMAIL PROTECTED]> wrote: > Hello, > > Sometimes when we place expectations on class methods, the class > methods seem to be not available in their previous form for other, > later specs. Calling the class methods in other specs result in a no > method e

[rspec-users] NoMethodError dependent on spec order

2008-11-04 Thread Jim Lindley
Hello, Sometimes when we place expectations on class methods, the class methods seem to be not available in their previous form for other, later specs. Calling the class methods in other specs result in a no method error. We commonly find this happening when model specs run after controller specs

Re: [rspec-users] Can I do foo.should (be_nil || be_empty) in rspec

2008-11-04 Thread Pat Maddox
"Andrew Premdas" <[EMAIL PROTECTED]> writes: > General case I'm thinking about is just testing that something should be one > thing or another > >e.g x.should be(foo || bar) > > Haven't got a specific example at the moment apart from the blank one. What > I'm thinking about is the syntax

Re: [rspec-users] Caboosers drop RSpec

2008-11-04 Thread aslak hellesoy
On Tue, Nov 4, 2008 at 4:20 PM, Steven Baker <[EMAIL PROTECTED]> wrote: >>> Never let the facts get it the way of a good headline? > > This is typical of rubyflow. I wouldn't worry about it too much. > > It was only a matter of time before the unfortunate political climate > of the Rails community

Re: [rspec-users] Caboosers drop RSpec

2008-11-04 Thread Steven Baker
>> Never let the facts get it the way of a good headline? This is typical of rubyflow. I wouldn't worry about it too much. It was only a matter of time before the unfortunate political climate of the Rails community started bleeding into our party. Please don't let this get in the way of learni

Re: [rspec-users] Caboosers drop RSpec

2008-11-04 Thread Ashley Moran
On 4 Nov 2008, at 15:13, Ashley Moran wrote: Never let the facts get it the way of a good headline? in even -- http://www.patchspace.co.uk/ http://aviewfromafar.net/ ___ rspec-users mailing list rspec-users@rubyforge.org http://rubyforge.org/ma

Re: [rspec-users] Caboosers drop RSpec

2008-11-04 Thread Ashley Moran
On 4 Nov 2008, at 14:37, Steven Baker wrote: The subject is wrong too; Caboosers didn't drop RSpec. Two people from caboose dropped RSpec. Most of the caboosers I know are still using RSpec. Sadly this one has legs and is running wild: http://www.rubyflow.com/items/1131 Never let the f

Re: [rspec-users] Caboosers drop RSpec

2008-11-04 Thread Zach Dennis
On Tue, Nov 4, 2008 at 8:25 AM, aslak hellesoy <[EMAIL PROTECTED]> wrote: > On Tue, Nov 4, 2008 at 10:39 AM, Tom Stuart <[EMAIL PROTECTED]> wrote: >> Hi, >> >> Any responses to >> http://blog.caboo.se/articles/2008/11/4/we-ve-stopped-using-rspec ? How much >> of this is due to legitimate bugs/probl

  1   2   >