Re: [rspec-users] RSPEC and RoR undefined method for hash when running model tests

2009-12-14 Thread David Salgado
Looks like you forgot to put "do" at the end of your specs. I do that all the time; it "should have a status of New Record" ... Should be it "should have a status of New Record" do ... HTH David 2009/12/14 Tom Stuart : > On 14 Dec 2009, at 20:36, Matt Riches wrote: >> 1) Why are my methods u

Re: [rspec-users] Database.truncate_all

2008-12-06 Thread David Salgado
ISTR that "destroy_all" will instantiate each object, before destroying it. If you just want to clean the database, I think "delete_all" is the one you want (it just does a "delete from [table]", if memory serves), and should be a lot quicker. David 2008/12/6 Mark Wilden <[EMAIL PROTECTED]>: > O

Re: [rspec-users] Newbie question, populate or ignore test db

2008-07-21 Thread David Salgado
Have you created the database "myspec_test"? If not, try running "rake db:create:all". If you have created it, then perhaps the test db doesn't have the right tables. So, try "rake db:test:prepare". You'll need to do that after every migration as well. HTH David 2008/7/21 Teedub <[EMAIL PROTE

Re: [rspec-users] How to run specs AND tests with autotest

2008-07-18 Thread David Salgado
> Any chance you have an rspec gem installed too? If so and you don't > need it, get rid of it. If so and you do need it, grab the latest > rspec/rspec-rails plugins and cd into the rspec directory and do this: Yes, that was it. Getting rid of my rspec gem did the trick. Many thanks David __

[rspec-users] How to run specs AND tests with autotest

2008-07-18 Thread David Salgado
Hi All I'm using test/unit on a project, at the client's insistence, but I'm also using rspec stories for integration testing. I notice that as soon as I install rspec and rspec-rails plugins, autotest no longer finds my test/unit tests - it just runs specs. Is there a way to make autotest run *bo

Re: [rspec-users] is there a plain format output for stories?

2008-07-09 Thread David Salgado
I've created a very simple 'basic' formatter, than prints story scenarios as . / P / F for passing, pending and failing scenarios. You can get it here; http://github.com/digitalronin/rspec/tree/master Run it by appending " --format=basic " to the command-line when running your stories. Hope it's

Re: [rspec-users] Re-use scenarios from another story file?

2008-07-05 Thread David Salgado
Many thanks for the advice, guys. David 2008/7/5 Ben Mabey <[EMAIL PROTECTED]>: > Zach Dennis wrote: > >> A short experience report regarding this thread: >> >> Early on when stories were introduced to rspec's code base I started using >> them, and I tried some different techniques to see what t

Re: [rspec-users] Re-use scenarios from another story file?

2008-07-04 Thread David Salgado
> Unless you're looking for the steps to show up when you run things, why not > just have a helper method that does the setup for you and then have a Given > step that invokes that method? > > I know I can extract logic into steps, but I'd like the pre-requisite >> scenarios to have some assertion

[rspec-users] Re-use scenarios from another story file?

2008-07-03 Thread David Salgado
Hi All Is there a way to have "pre-requisite" story scenarios, and include them using GivenScenario in a different story file? i.e. I'd like to have a file "prereqs.story", with "Scenario: A common setup", and then in "somestuff.story" have "GivenScenario: A common setup...", and have the scenari