[rspec-users] rspec controller action list

2008-02-28 Thread Namrata Tiwari
This action will list all the articles according to city. Please, can some one guide me through this spec. def list @articles = find_city.articles.paginate :all, :page => params[:page] , :order => "live_on DESC", :conditions => { :type_for => "blog" } end it "should list all articles" do

Re: [rspec-users] Problem with Plain Text Story Runner

2008-02-28 Thread Matthias Hennemeyer
Hi Greg, maybe you did not append a colon to the word 'Story' in the plain text file. The runner want it this way: Story: Story Title ... Matthias Am 27.02.2008 um 15:14 schrieb Greg Gigon: > Hi Guys > I'm new to Ruby and BDD. > I'm having a problem while running my story in plain text. > This

Re: [rspec-users] bad specs better than none?

2008-02-28 Thread Glenn Ford
I have a similar perspective from my own personal experience. I am still quite the novice, but I'm as much of a novice in RSpec as I am in Ruby / RoR. Honestly, a lot of my specs in new sections end up having great coverage, but are full of real models and few of the "purist" BDD practice

Re: [rspec-users] rspec controller action list

2008-02-28 Thread David Chelimsky
On Thu, Feb 28, 2008 at 3:54 AM, Namrata Tiwari <[EMAIL PROTECTED]> wrote: > This action will list all the articles according to city. Please, can > some one guide me through this spec. > > def list > @articles = find_city.articles.paginate :all, :page => params[:page] This line has what we c

Re: [rspec-users] bad specs better than none?

2008-02-28 Thread David Chelimsky
On Thu, Feb 28, 2008 at 7:22 AM, Glenn Ford <[EMAIL PROTECTED]> wrote: > I have a similar perspective from my own personal experience. I am > still quite the novice, but I'm as much of a novice in RSpec as I am > in Ruby / RoR. Honestly, a lot of my specs in new sections end up > having great

Re: [rspec-users] Problem with Plain Text Story Runner

2008-02-28 Thread Greg Gigon
Hey Mtthias Thank you for your help. The issue actually was that I didn't have spaces after colons.Like: Story:Blabla Now when I added the spaces it works fine. Cheers for that :) Greg Matthias Hennemeyer wrote: > Hi Greg, > maybe you did not append a colon to the word 'Story' in the plain > te

Re: [rspec-users] Webrat integration with Rspec and Rake tasks

2008-02-28 Thread Ed Howland
> > It is set in stories/helper.rb, but not working. ./script/generate > rspec creates a file with: > ENV['RAILS_ENV']="test" > > which is deprecated It should be: > RAILS_ENV="test" > > Changed that and it all worked fine. > > Ed which then promptly broke migrations and other Rakeish thin

[rspec-users] Autotest file

2008-02-28 Thread Bryan Ray
I'm using rSpec 1.1.3 and ZenTest 3.9.1 and every time I run a test I get "All Tests Passed" ... perhaps I should just leave it that way? :p Anyways, I've attempted to construct my own ~/.autotest file and it's extremely basic, but for some reason whenever I make one test fail (on purpose) it stil

Re: [rspec-users] Autotest file

2008-02-28 Thread David Chelimsky
On Thu, Feb 28, 2008 at 2:59 PM, Bryan Ray <[EMAIL PROTECTED]> wrote: > I'm using rSpec 1.1.3 and ZenTest 3.9.1 and every time I run a test I get > "All Tests Passed" ... perhaps I should just leave it that way? :p > > Anyways, I've attempted to construct my own ~/.autotest file and it's > extremel

Re: [rspec-users] Autotest file

2008-02-28 Thread Bryan Ray
Yup ... was just about to respond. A little more google finally turned up http://rspec.lighthouseapp.com/projects/5645/tickets/279-autotest-never-calls-the-red-hook Thanks for the quick reply, David. On Thu, Feb 28, 2008 at 3:12 PM, David Chelimsky <[EMAIL PROTECTED]> wrote: > On Thu, Feb 28, 2

[rspec-users] New generated RSpec Video, demonstrating a GTK app

2008-02-28 Thread Kero
Hi all, With some time spent last Tue on the nyc.rb hackfest, I have a second video today of my endeavours with RSpec and recordings. It shows a handful of When&Then steps, with the accompanying GTK2 GUI executing these steps. One nasty thing about Gtk (and virtually all other toolkits) is that t

Re: [rspec-users] rspec controller action list

2008-02-28 Thread Namrata Tiwari
Thanks Mr David for your reply. This gives me a better understanding of so called train wreck. I am still facing problems with this spec. firstly - I think I need to put a colon before order(e.g. :order=> "live_on DESC") #list it "should list all articles" do articles = mock("articles")

Re: [rspec-users] bad specs better than none?

2008-02-28 Thread Kero
> Here's my theory. You remind me of the four stages of learning > Ranked, in ascending order of desirability: > No tests > Green suite, poor tests Unconsciously Incompetent > Red suite, poor tests Consciously Incompetent > Red suite, quality tests Consciously Competent > Green suite, quality t

Re: [rspec-users] bad specs better than none?

2008-02-28 Thread Siemen Baader
On Thu, Feb 28, 2008 at 2:22 PM, Glenn Ford <[EMAIL PROTECTED]> wrote: I agree with David - you are certainly on the right track. I also think you are doing the right thing when you write specs even if they seem not perfect to you at first attempt - once you have written the code you can evaluate