Re: [rspec-users] need help getting a word right

2007-07-18 Thread Kyle Hargraves
David Chelimsky wrote: > Consise? Yes. But I'm not psyched about 'specify' either. There IS a > perfect word for this situation. What is it? Suggestions? Personally, I disagree. For examples like that, I think 'specify' is a pretty ideal word. It reads exactly as I want it to. Depending on what

Re: [rspec-users] Vim tree plugin?

2008-10-27 Thread Kyle Hargraves
On Sun, Oct 26, 2008 at 4:11 PM, Steve <[EMAIL PROTECTED]> wrote: > Does anyone know if there's a vim plugin out there that will show a tree of > your describe/it blocks at a glance. Preferably with click ability to go > right to that location? It'd be awesome to have a ctags-esque feature for vie

Re: [rspec-users] uber-rcov for both cucumber & rspec

2008-12-08 Thread Kyle Hargraves
On Mon, Dec 8, 2008 at 11:56 AM, Rupert Voelcker <[EMAIL PROTECTED]> wrote: > I've had a quick look at the rake tasks for rspec and cucumber (and > rcov), but not having payed with rake very much I can't at the moment > get my head around what I need to do so am hoping for some > guidance > > W

Re: [rspec-users] before(:all)

2009-06-09 Thread Kyle Hargraves
On Sun, Jun 7, 2009 at 9:40 PM, lawrence.pit wrote: > Hi, > > I took a stab at this and created what I call Machinery. So far it > works great for me. > > For those that are looking for a way to create objects in the database > in a before(:all) instead of a before(:each) to speed up tests, have a

Re: [rspec-users] Dealing with nested/namespaced classes w/ describe

2007-07-23 Thread Kyle Hargraves
Scott Taylor wrote: > Hi all, > > Just wondering about this: I've been dealing with classes/modules > nested in several layers of namespaces. Here would be an example of > a describe block: > > describe ClassOne::ClassTwo::ClassThree, "description here" do > ... > end > > What would be the

Re: [rspec-users] Mock or Stub strategy for validates_uniqueness_of

2007-07-24 Thread Kyle Hargraves
Daniel N wrote: > On 7/25/07, Mikel Lindsaar <[EMAIL PROTECTED]> wrote: >> >> There would be a different way. >> >> In the idea of "Only test the code you write" all you really need to >> spec is that you have set the right association, because activerecord >> has it's own tests to ensure the uniq

Re: [rspec-users] Isolating rails model specs from their implementation

2007-07-29 Thread Kyle Hargraves
Russell Tracey wrote: > It's my understanding that model specs (and specs in general) should > be shielded from the implementation details, so how do i check that > Project.active_projects only returns active projects without looking > at assuming something about the implementation? My initial thou

Re: [rspec-users] it "should [action] ..." vs it with an active voice

2007-11-12 Thread Kyle Hargraves
On Nov 12, 2007 11:39 AM, Brian Takita <[EMAIL PROTECTED]> wrote: > Here are the main reasons that I prefer an active voice because: > * using it "should ..." over and over renders should meaningless (I > have grown this barely conscience aversion to the word 'should') > * less less words are neede

Re: [rspec-users] RSpec on Rails 2.0

2007-11-14 Thread Kyle Hargraves
On Nov 14, 2007 12:32 PM, David Chelimsky <[EMAIL PROTECTED]> wrote: > http://rspec.rubyforge.org/documentation/rails/install.html > > CURRENT means the latest release, not the trunk. 1.0.8 was out months > ago - obviously not compatible with subsequent changes to rails. > > Cheers, > David I see

Re: [rspec-users] namespaced controllers

2007-11-23 Thread Kyle Hargraves
On Nov 23, 2007 3:48 PM, Scott Taylor <[EMAIL PROTECTED]> wrote: > > Out of curiosity, I've seen the following fail: > > module Admin >describe MyController >... >end > end > > But this works fine: > > describe Admin::MyController >.. > end How has the top one failed? I use it excl

Re: [rspec-users] namespaced controllers

2007-11-25 Thread Kyle Hargraves
On Nov 23, 2007 11:53 PM, Scott Taylor <[EMAIL PROTECTED]> wrote: > I got an "unknown action foo" error message (wasn't getting it before > today - running on trunk). > > > Scott Can you reproduce it reliably? I had an Admin::SomeController controller, and the specs were passing fine. I went to a

Re: [rspec-users] namespaced controllers

2007-11-25 Thread Kyle Hargraves
On Nov 25, 2007 9:23 AM, Kyle Hargraves <[EMAIL PROTECTED]> wrote: > On Nov 23, 2007 11:53 PM, Scott Taylor <[EMAIL PROTECTED]> wrote: > > I got an "unknown action foo" error message (wasn't getting it before > > today - running on trunk). > > > &

[rspec-users] Story HTML Formatter

2007-12-09 Thread Kyle Hargraves
I recently noticed the HTML formatter for the story runner, but I'm unable to figure out how to make it function. 'ruby stories/all.rb --format html' seems like it should work, in that --help works as expected, but I still get only plain text output. Maybe it's not been wired up yet and/or this i

Re: [rspec-users] namespaced controllers

2007-12-12 Thread Kyle Hargraves
On Dec 12, 2007 4:37 PM, David Chelimsky <[EMAIL PROTECTED]> wrote: > On Dec 12, 2007 5:03 AM, Thijs Cadier <[EMAIL PROTECTED]> wrote: > > > > Has anybody been taking a look at this issue? I'm getting a little annoyed > > touching the namespaced controllers before running the specs all the time > >

Re: [rspec-users] namespaced controllers

2007-12-12 Thread Kyle Hargraves
On Dec 12, 2007 5:03 AM, Thijs Cadier <[EMAIL PROTECTED]> wrote: > > Has anybody been taking a look at this issue? I'm getting a little annoyed > touching the namespaced controllers before running the specs all the time > :-). As a workaround, do what the rest of us have done and just be explicit

Re: [rspec-users] "Tricks" for testing after_create callback???

2007-12-12 Thread Kyle Hargraves
On Dec 12, 2007 9:09 PM, Rick DeNatale <[EMAIL PROTECTED]> wrote: > I've got a model Message, which needs to send an email using action > mailer after it's first saved in the database. > > I want to pass the model to the mailer which then uses methods on the > message model to render the email. > >

[rspec-users] Fwd: Vim integration.

2007-12-16 Thread Kyle Hargraves
On Dec 14, 2007 6:52 AM, Erik Terpstra <[EMAIL PROTECTED]> wrote: > Hi, > > Does anybody have a vim script that enables me to run specs from within > vim and have the cursor positioned on the right line in case of a backtrace? > > TIA, > > Erik. Having finally gone back to vim from textmate (after

Re: [rspec-users] Story runner rake task

2007-12-19 Thread Kyle Hargraves
On Dec 19, 2007 7:01 PM, James Deville <[EMAIL PROTECTED]> wrote: > What's the status on a rake task for the story runner. If nothing is > in progress, where could I start to try and build one? > > JD I've been using: task 'stories' do sh "ruby stories/all.rb" end task 'stories:rcov' do sh "

Re: [rspec-users] Converting to Rails 2.0.2

2007-12-28 Thread Kyle Hargraves
The REV constants no longer exist in trunk (and haven't for a while), yet somehow your rspec_on_rails in vendor is still expecting it. Meaning you don't actually have a copy of trunk in plugins/rspec_on_rails, I guess. HTH Kyle On 12/28/07, s.ross <[EMAIL PROTECTED]> wrote: > I'm moving an older

Re: [rspec-users] Failed specs spike autotest

2008-02-14 Thread Kyle Hargraves
On Thu, Feb 14, 2008 at 3:37 PM, Steve <[EMAIL PROTECTED]> wrote: > I'm getting some weird behavior. I'm currently running on trunk rspec/ > rails, with 3.9.1 autotest. If a all tests succeed or are pending, > autotest just sits there dutifully with the blinking cursor. If an > example fails, it

Re: [rspec-users] Failed specs spike autotest

2008-02-15 Thread Kyle Hargraves
Thank you much. On Fri, Feb 15, 2008 at 12:07 AM, David Chelimsky <[EMAIL PROTECTED]> wrote: > The source of the bug was a patch that we applied a while back. This > was after the 1.1.3 release, so if you're using 1.1.3 you're fine. If > you're using trunk, go ahead and update and you should be

Re: [rspec-users] should have_tag outside Rails

2008-03-17 Thread Kyle Hargraves
On Mon, Mar 17, 2008 at 10:44 AM, Ashley Moran <[EMAIL PROTECTED]> wrote: > On 17/03/2008, Ashley Moran <[EMAIL PROTECTED]> wrote: > > Has anyone managed this? > > > > Cracked it. Really ugly, but my stories/helper.rb looks like this > > ENV["RAILS_ENV"] = "test_integration" > require File.exp

Re: [rspec-users] should have_tag outside Rails

2008-03-18 Thread Kyle Hargraves
On Tue, Mar 18, 2008 at 9:04 AM, Ashley Moran <[EMAIL PROTECTED]> wrote: > On 17/03/2008, Kyle Hargraves <[EMAIL PROTECTED]> wrote: > > > We discussed this in a ticket on lighthouse, and I ended up writing a > > workalike that's sitting atop hpricot. It'

[rspec-users] [ANN] rspec_hpricot_matchers 1.0: have_tag on hpricot

2008-03-26 Thread Kyle Hargraves
Hello everyone, A few weeks ago, I put together a little project that provides a have_tag() matcher look-alike that can be used outside of Rails projects, backed by Hpricot, which I very creatively named rspec_hpricot_matchers. It's not a drop-in replacement for rspec_on_rails' have_tag(): no subs

Re: [rspec-users] newb q: Can story steps report a view rendering error?

2008-04-02 Thread Kyle Hargraves
On Wed, Apr 2, 2008 at 6:09 PM, Tim Haines <[EMAIL PROTECTED]> wrote: > Hi'ya > > I have a When step that calls get game_url. It turns out that calling this > page is resulting in a render error, which explains my failing Then steps. > It would help me if the story told me there was a problem rend

[rspec-users] Command line story runner

2008-04-03 Thread Kyle Hargraves
Hullo all, It sucks to write wrapper .rb files just so stories/all.rb can find and run them. So I am trawling for feedback on a small project I pushed to github a day or two ago; it provides a 'story' executable that can be used to run your plain text stories from the command line, akin to the 's

Re: [rspec-users] Command line story runner

2008-04-04 Thread Kyle Hargraves
On Fri, Apr 4, 2008 at 5:21 PM, Joe Van Dyk <[EMAIL PROTECTED]> wrote: > On Thu, Apr 3, 2008 at 7:58 AM, Kyle Hargraves <[EMAIL PROTECTED]> wrote: > > Hullo all, > > > > It sucks to write wrapper .rb files just so stories/all.rb can find > > and run t

Re: [rspec-users] Command line story runner

2008-04-04 Thread Kyle Hargraves
On Fri, Apr 4, 2008 at 7:02 AM, Kamal Fariz <[EMAIL PROTECTED]> wrote: > Hi Kyle, > > I tried the story runner against a story. Unfortunately, it had > problems executing webrat methods like 'visits'. > > Kindly check out this pastie: http://pastie.org/175204 > > I tried running it with the nor

Re: [rspec-users] newbq: Organizing your stories

2008-04-11 Thread Kyle Hargraves
On Fri, Apr 11, 2008 at 3:43 AM, Ashley Moran <[EMAIL PROTECTED]> wrote: > > On 11 Apr 2008, at 05:16, Zach Dennis wrote: > > > - stories/ > > - projects/ > > - a_user_creating_a_project_story > > - a_project_manager_adding_users_to_a_project_story > > - admin/ > >

Re: [rspec-users] Date comparisons

2008-05-03 Thread Kyle Hargraves
On Sat, May 3, 2008 at 1:12 PM, Steve Downey <[EMAIL PROTECTED]> wrote: > Is there more precision than seconds in a Time instance? > > irb(main):006:0> a,b = Time.now, Time.now > => [Sat May 03 11:06:31 -0700 2008, Sat May 03 11:06:31 -0700 2008] > irb(main):007:0> puts a.to_i, b.to_i > 1209837991

Re: [rspec-users] Are you writing "imperative" or "declarative" scenarios in your stories?

2008-05-11 Thread Kyle Hargraves
On Sun, May 11, 2008 at 4:01 PM, Ben Mabey <[EMAIL PROTECTED]> wrote: > I'm curious what everyone else on this list has been doing in this regard. > Are you writing declarative scenarios all the time? Or are you reusing a > lot of your steps with detailed scenarios? A little bit of both maybe?

Re: [rspec-users] How to write a test for validates_uniqueness_of

2008-05-20 Thread Kyle Hargraves
On Tue, May 20, 2008 at 6:59 PM, T K <[EMAIL PROTECTED]> wrote: > Hi, > > I have a spec > > it "should have a unique username " > > I have a code: > > validates_uniqueness_of :user_name > > > Now, I don't know how to test this code. In order to test this, do I > need to run `save`? > > For exampl

[rspec-users] Rails integration tests without stories

2008-06-07 Thread Kyle Hargraves
I'm looking to drive the development of a rails app that does nothing but serve a JSON API. All of the models are well tested elsewhere, so I needn't worry about that. My only immediate goal is to be able to fire off requests to a path and check the returned JSON. I've tried a number of methods fo

Re: [rspec-users] Rails integration tests without stories

2008-06-07 Thread Kyle Hargraves
On Sat, Jun 7, 2008 at 3:16 PM, David Chelimsky <[EMAIL PROTECTED]> wrote: >> I started with user stories, but the conversion to english was >> difficult for something largely developer-facing. "When I get >> /widgets/:id" where :id is actually determined behind the scenes did >> not read well, and

Re: [rspec-users] Reusing story snippets

2008-06-14 Thread Kyle Hargraves
On Sat, Jun 14, 2008 at 5:03 AM, Mikel Lindsaar <[EMAIL PROTECTED]> wrote: > I find myself doing this: > > Scenario "logged in user visiting the home page" do > Given "A logged in user" do >a_logged_in_user > end > > When "..." > Then "..." > end > > The a_logged_in_user method is a helper

Re: [rspec-users] Autotest/RSpec 1.1.4/Rails 2.1 Infinite Loop?

2008-06-19 Thread Kyle Hargraves
On Thu, Jun 19, 2008 at 9:41 AM, Jim Lindley <[EMAIL PROTECTED]> wrote: >>> I just got back from RailsConf, and upgraded on of my development apps to >>> 2.1, and now autotest is going into an infinite loop. It runs tests >>> continuously instead of waiting for files to be saved before rerunning. >

Re: [rspec-users] MVC testing vs. models & Webrat+RailsStory?

2008-06-19 Thread Kyle Hargraves
On Thu, Jun 19, 2008 at 9:31 AM, Christopher Bailey <[EMAIL PROTECTED]> wrote: > Specifically, I'm wondering, or contemplating, if I do unit tests for > my models, and then I use WebRat plus RailsStory, do I even need to > then do functional testing of my controllers and views? I can see > that I

Re: [rspec-users] Autotest/RSpec 1.1.4/Rails 2.1 Infinite Loop?

2008-06-19 Thread Kyle Hargraves
On Thu, Jun 19, 2008 at 12:32 PM, Lori M Olson <[EMAIL PROTECTED]> wrote: > Would you have an example of such an exception to share? > > Thanks, Lori The .autotest at the base of one of my plugins, which updates a .sqlite3: Autotest.add_hook :initialize do |at| at.add_exception('spec/db/tracks_

Re: [rspec-users] MVC testing vs. models & Webrat+RailsStory?

2008-06-20 Thread Kyle Hargraves
On Thu, Jun 19, 2008 at 11:56 AM, Christopher Bailey <[EMAIL PROTECTED]> wrote: > Kyle, thanks much for sharing your experience. You mention the speed > and so on. I've read that it is slow. Question: does Autotest work > the same way with stories, or have a way to detect what file(s) > changed

Re: [rspec-users] Stopping example execution?

2008-06-28 Thread Kyle Hargraves
On Sat, Jun 28, 2008 at 5:57 PM, Britt Mileshosky <[EMAIL PROTECTED]> wrote: > > Hello, I'm wondering If I am missing something here when creating an example > that sets an expecation at the top or beginning of an action but requires you > to stub / mock everything that follows. > > Example: > I

Re: [rspec-users] Someone please name this matcher for me

2008-08-07 Thread Kyle Hargraves
On Wed, Aug 6, 2008 at 1:25 PM, Cohen, Joseph <[EMAIL PROTECTED]> wrote: > > Consider: > should_have_the_same_members_as Similarly, I have a have_same_elements_as(arr) matcher. k ___ rspec-users mailing list rspec-users@rubyforge.org http://rubyforge.or