[rspec-users] active_scaffold partials

2007-08-15 Thread Jonathan Linowes
An issue I've run into is with a controller using the active_scaffold plugin, which injects a method that modifies the search path for partial files. When I try to run a spec on a a_s partial it reports the file cannot be found. I think this is the a_s code that does it but I'm not sure

Re: [rspec-users] Deprecating the mocking framework?

2007-09-04 Thread Jonathan Linowes
Personally, I dont want to become an expert at the range of possible testing and mocking tools. I just want a solid framework to get my work done, recommended by experts like you. And the less different components I need to install and maintain, the better. So I prefer the integrated

Re: [rspec-users] response.should render_layout ....

2007-09-05 Thread Jonathan Linowes
Here's how I did it http://rubyforge.org/pipermail/rspec-users/2007-May/001818.html linoj On Sep 5, 2007, at 9:58 AM, Ingo Weiss wrote: Hi, is there a way to assert in rspec that a template is rendered in a specific layout? Thanks! Ingo ___

[rspec-users] simple story, extract link

2007-09-25 Thread Jonathan Linowes
hi, I just started fooling around with story runner, thought I'd start with a dead simple scenario: The first thing I do when describing a site to someone is go to the home page, and begin exploring public pages from there. So, that seems like a good first story to spec out. And I'd really

Re: [rspec-users] simple story, extract link

2007-09-25 Thread Jonathan Linowes
] wrote: On 9/25/07, Jonathan Linowes [EMAIL PROTECTED] wrote: hi, I just started fooling around with story runner, thought I'd start with a dead simple scenario: The first thing I do when describing a site to someone is go to the home page, and begin exploring public pages from there. So

Re: [rspec-users] How do I best setup data for Story Runner?

2007-09-28 Thread Jonathan Linowes
Scott, Thanks for the plug-in, http://thmadb.com/public_svn/plugins/ fixture_replacement I've started using it, replacing my ad hoc factory methods And I like the idea of putting the factory in db/ btw, for the record, while the Dan Manges blog was posted Aug 07, the first time I saw this

Re: [rspec-users] How do I best setup data for Story Runner?

2007-09-28 Thread Jonathan Linowes
, 2007, at 5:11 PM, Scott Taylor wrote: On Sep 28, 2007, at 1:20 PM, Jonathan Linowes wrote: Scott, Thanks for the plug-in, http://thmadb.com/public_svn/plugins/ fixture_replacement I've started using it, replacing my ad hoc factory methods And I like the idea of putting the factory in db

[rspec-users] flash in story runner

2007-10-01 Thread Jonathan Linowes
hi, is there a way to assert a flash message directly in story runner? Or do I have to go through the response text instead. Then flash message should say success do #flash[:notice].should == User successfully invited response.should have_text(/User successfully

[rspec-users] skip pending (was Re: Posted this in dev last night but I'm not sure that anyone reads it)

2007-10-01 Thread Jonathan Linowes
), and the remaining unexecuted ones in grey. On 10/1/07, Jonathan Linowes [EMAIL PROTECTED] wrote: If you add the pending statement before other non-pending ones, it stops at the first pending one. That forces me to implement them in the order specified, a rough example: Then user was authorized

[rspec-users] color output?

2007-10-02 Thread Jonathan Linowes
does story runner have commandline options ,eg to add color to output? ___ rspec-users mailing list rspec-users@rubyforge.org http://rubyforge.org/mailman/listinfo/rspec-users

Re: [rspec-users] color output?

2007-10-02 Thread Jonathan Linowes
! On 10/2/07, Jonathan Linowes [EMAIL PROTECTED] wrote: does story runner have commandline options ,eg to add color to output? ___ rspec-users mailing list rspec-users@rubyforge.org http://rubyforge.org/mailman/listinfo/rspec-users

Re: [rspec-users] simple story, extract link

2007-10-03 Thread Jonathan Linowes
: On 9/25/07, David Chelimsky [EMAIL PROTECTED] wrote: On 9/25/07, Jonathan Linowes [EMAIL PROTECTED] wrote: hi, I just started fooling around with story runner, thought I'd start with a dead simple scenario: The first thing I do when describing a site to someone is go to the home page

Re: [rspec-users] skip pending

2007-10-08 Thread Jonathan Linowes
fyi, In the meantime I've written a little helper def skip_pending(text='') puts SKIP PENDING #{text} end so I can do And foo foo bar bar do skip_pending Implement foo bar end On Oct 1, 2007, at 10:44 PM, Jonathan Linowes wrote: The way I've started using story runner is to write

[rspec-users] locals in partials

2007-10-12 Thread Jonathan Linowes
hiya, in specing a partial, how can i assign a local var that is normally passed via :locals ? i tried adding :locals = to the render call but that doesnt seem to take linoj ___ rspec-users mailing list rspec-users@rubyforge.org

Re: [rspec-users] Top Quoting?

2007-10-15 Thread Jonathan Linowes
Not to beat an already beaten horse, but... I see email more as a dynamic information flow than a static page, especially active conversations like this, so I like to see the current response at the top, immediately accessible, and visible in my preview pane. Or, maybe I should look for a mail

Re: [rspec-users] works in script but not in rake

2007-10-16 Thread Jonathan Linowes
btw I just noticed the text of the example is a typo, it -is- a GET called in the spec with get :accept, :project_id = @project.id, :id = @mem.id On Oct 17, 2007, at 1:01 AM, Jonathan Linowes wrote: Hi, This is weird All my current spec examples are passing (about 750 of 'em

Re: [rspec-users] works in script but not in rake

2007-10-17 Thread Jonathan Linowes
On Oct 17, 2007, at 1:26 AM, David Chelimsky wrote: On 10/17/07, Jonathan Linowes [EMAIL PROTECTED] wrote: Hi, This is weird All my current spec examples are passing (about 750 of 'em) except a set of 6 in a specific controller spec. I get the following failure on each 6 when I run it via

Re: [rspec-users] plain text stories: motivation number 27

2007-10-17 Thread Jonathan Linowes
On Oct 17, 2007, at 10:41 AM, David Chelimsky wrote: This is mostly theoretical, but ... I'm starting to use lighthouse (http://llighthouseapp.com) for my projects at work. I'm organizing iterations as milestones and stories as tickets tagged to a milestone. Lighthouse offers an API so

Re: [rspec-users] Side Effects in Stories

2007-10-19 Thread Jonathan Linowes
On Oct 19, 2007, at 1:54 PM, s.ross wrote: On Oct 18, 2007, at 6:09 AM, Daniel N wrote: On 9/11/07, s.ross [EMAIL PROTECTED] wrote: I have a story where the user resets the password [hey, this story thing really rocks!]. It is expected that the password will change and that the user will be

Re: [rspec-users] Side Effects in Stories

2007-10-19 Thread Jonathan Linowes
On Oct 19, 2007, at 3:30 PM, Ben Mabey wrote: snip yes, upon closer inspection, (as in http://www.vaporbase.com/postings/ Rspec_1.0_and_Restful_Authentication) in spec_helper.rb def set_mailer_in_test ActionMailer::Base.delivery_method = :test ActionMailer::Base.perform_deliveries =

Re: [rspec-users] Assumption tests

2007-10-19 Thread Jonathan Linowes
But dont you really just want to test the behavior of the class? (whereas the validator call is an implementation) such as it should require digits do p = PhoneNumber.new( :digits = nil ) p.should_not be_valid p.errors.on(:digits).should == can't be blank end On Oct 19,

Re: [rspec-users] plain text stories

2007-10-23 Thread Jonathan Linowes
http://www.georgeglazer.com/prints/illus/wein-monkeydress.JPG On Oct 23, 2007, at 11:11 AM, Dan North wrote: Of course when I said Pat, I in fact meant David and his monkey :) On 10/22/07, Pat Maddox [EMAIL PROTECTED] wrote: On 10/22/07, Dan North [EMAIL PROTECTED] wrote: Haha -

Re: [rspec-users] How is everyone structuring stories?

2007-10-23 Thread Jonathan Linowes
app is short for application, lib is short for library so why not shorten behavior to something like beh or behav (also avoids the 2 english spellings) /beh/specs /beh/stories On Oct 23, 2007, at 6:02 PM, Ashley Moran wrote: On Oct 23, 2007, at 9:55 pm, David Chelimsky wrote:

Re: [rspec-users] How is everyone structuring stories?

2007-10-24 Thread Jonathan Linowes
On Oct 23, 2007, at 6:32 PM, David Chelimsky wrote: On 10/23/07, Jonathan Linowes [EMAIL PROTECTED] wrote: app is short for application, lib is short for library so why not shorten behavior to something like beh or behav (also avoids the 2 english spellings) /beh/specs /beh/stories beh

[rspec-users] rspec and capistrano

2007-10-26 Thread Jonathan Linowes
Hi, has anyone here written a capistrano task for rspec to run through my specs on the deployed server? I'd appreciate a snippet or two to get me started. Thx linoj ___ rspec-users mailing list rspec-users@rubyforge.org

[rspec-users] rake spec default environment

2007-10-29 Thread Jonathan Linowes
hi, When I run rake spec , it seems to be starting with my default environment (development or production) and connects to that database, before actually connecting to the test one and proceeding with the tests. When I remove the development database, the specs wont run. How do i

Re: [rspec-users] rake spec default environment

2007-10-29 Thread Jonathan Linowes
On Oct 29, 2007, at 10:55 AM, Scott Taylor wrote: On Oct 29, 2007, at 9:04 AM, Jonathan Linowes wrote: hi, When I run rake spec , it seems to be starting with my default environment (development or production) and connects to that database, before actually connecting to the test one

Re: [rspec-users] rake spec default environment

2007-10-29 Thread Jonathan Linowes
On Oct 29, 2007, at 9:04 AM, Jonathan Linowes wrote: hi, When I run rake spec , it seems to be starting with my default environment (development or production) and connects to that database, before actually connecting to the test one and proceeding with the tests. When I remove

Re: [rspec-users] Not sure why this is failing

2007-11-18 Thread Jonathan Linowes
personally I find this to be one of the most frustrating things about rspec, well, rspec's stubs and wish the error messages could be much more helpful, rather than just telling that an expected method was not called, tell me if/when it was called with some other args instead (if this causes

[rspec-users] rubyforge (was Re: Not sure why this is failing)

2007-11-18 Thread Jonathan Linowes
18, 2007, at 11:16 AM, David Chelimsky wrote: On Nov 18, 2007 10:10 AM, Jonathan Linowes [EMAIL PROTECTED] wrote: personally I find this to be one of the most frustrating things about rspec, well, rspec's stubs and wish the error messages could be much more helpful, rather than just telling

Re: [rspec-users] Down with Lambda!!

2007-11-18 Thread Jonathan Linowes
# for readability alias :running :lambda Q.E.D. On Nov 18, 2007, at 2:07 PM, Shane Mingins wrote: On 18/11/2007, at 1:01 PM, David Chelimsky wrote: We're still writing Ruby here, aren't we!!! Cheers, David Wanted to share my initial reaction to your Ruby statement. Are we writing

Re: [rspec-users] rake spec default environment

2007-11-19 Thread Jonathan Linowes
fails Is there a way to force the rake task to copy the schema from production rather than development? linoj On Oct 29, 2007, at 10:55 AM, Scott Taylor wrote: On Oct 29, 2007, at 9:04 AM, Jonathan Linowes wrote: hi, When I run rake spec , it seems to be starting with my default environment

[rspec-users] cap deploy:spec

2007-11-20 Thread Jonathan Linowes
fyi, I just posted this http://www.vaporbase.com/postings/Running_rspec_after_you_deploy - linoj ___ rspec-users mailing list rspec-users@rubyforge.org http://rubyforge.org/mailman/listinfo/rspec-users

Re: [rspec-users] spec'ing shared controller methods

2007-12-03 Thread Jonathan Linowes
didnt mean to confuse, i'm asking about the code in the body of the email. The pastie was just for background reference. --J On Dec 4, 2007, at 12:41 AM, Jonathan Linowes wrote: I want to isolate and spec methods that are shared by controllers, and live in application.rb. Whereas I usually

Re: [rspec-users] Unexpected message on :attr_accessor

2007-12-04 Thread Jonathan Linowes
This should be: @user.should_receive(:password_confirmation=) Lots of beginners make this mistake. Maybe RSpec's mock framework should be smart enough to suggest this fix by itself. Patch anyone? Aslak perhaps be even more explicit that it's an accessor, like

Re: [rspec-users] Unexpected message on :attr_accessor

2007-12-04 Thread Jonathan Linowes
err, that suggestion was supposed to read @user.should_set... etc On Dec 4, 2007, at 3:54 PM, Jonathan Linowes wrote: This should be: @user.should_receive(:password_confirmation=) Lots of beginners make this mistake. Maybe RSpec's mock framework should be smart enough to suggest

Re: [rspec-users] Unexpected message on :attr_accessor

2007-12-04 Thread Jonathan Linowes
damn, looks like I'm going to have to come up with 997 more good ideas just to break even :) On Dec 4, 2007, at 4:18 PM, David Chelimsky wrote: -1000 ___ rspec-users mailing list rspec-users@rubyforge.org

[rspec-users] default_url_options

2007-12-11 Thread Jonathan Linowes
Hi, i recently added a def default_url_options to application.rb (used by url_for , *_path etc). My method references request (eg request.domain) . But when I spec a controller, its dies in default_url_options with nil.domain, Is there a way for it to see request? I prefer to not have to

Re: [rspec-users] stub with assigns?

2007-12-12 Thread Jonathan Linowes
On Dec 13, 2007, at 2:06 AM, Jarkko Laine wrote: On 13.12.2007, at 9.00, Jonathan Linowes wrote: is there a way to stub a method that sets an instance variable, so the stub sets it too? def find_foo @foo = Foo.find(params[:id] end ... controller.stub!(:find_foo).and_assigns(:foo

Re: [rspec-users] how do I spec my Rails routes?

2007-12-16 Thread Jonathan Linowes
personally I've broken with convention and put all my route specs into a routes_spec.rb file in part because they're in one file in rails, and when i edit that file I want to make sure other routes didn't break. Your question about a catchall is another reason. I also like to spec named

[rspec-users] shared behav

2007-12-18 Thread Jonathan Linowes
hi, i want to make a behavior shared between models, the examples need to create new instances etc. Is there a way to pass the model class to the shared behavior? ___ rspec-users mailing list rspec-users@rubyforge.org

[rspec-users] link to lighthouse?

2007-12-19 Thread Jonathan Linowes
fyi, there doesnt seem to be a link to rspec.lighthouse.com from the new web site (unless I missed it). I guess I expected it under Community linoj ___ rspec-users mailing list rspec-users@rubyforge.org

Re: [rspec-users] StoryRunner docs/guidance

2007-12-21 Thread Jonathan Linowes
I just went through this myself yesterday, and was considering posting an article on my blog, but figured it'd be too short lived, once the doc page is up on the rspec site. So I'll post here what I've cobbled together from various other articles, emails, and generous help on #rspec. 1.

[rspec-users] StepGroup ?

2007-12-21 Thread Jonathan Linowes
Hi, I have a need for the StepGroup feature in stories but not clear what's the current api. Could you provide an example? In my case I have several scenarios which vary in the Givens, but not the results. Ideally I'm hoping to achieve something like: (but anything will do for now :)

Re: [rspec-users] StepGroup ?

2007-12-22 Thread Jonathan Linowes
Sorry, I guess stepgroup is the steps_for framework, and not what I'm asking about. Is there a way to hierarchically combine steps under a single step to achieve? On Dec 22, 2007, at 2:51 AM, Jonathan Linowes wrote: Hi, I have a need for the StepGroup feature in stories but not clear

Re: [rspec-users] Varying test data

2008-01-11 Thread Jonathan Linowes
On Jan 11, 2008, at 5:50 AM, David Chelimsky wrote: Apparently, Pat and I are twins separated at birth. Would it then be correct to refactor and eliminate one of them?? :)) ___ rspec-users mailing list rspec-users@rubyforge.org

Re: [rspec-users] RSpec stories introduction

2008-01-15 Thread Jonathan Linowes
similarly, here's my write up: http://www.vaporbase.com/postings/Getting_Started_with_Story_Runner linoj On Jan 15, 2008, at 8:18 PM, James Byrne wrote: I can get to the RSpec list through ruby-forum. Yes! The things you discover googling for help! I followed the advice to go to

Re: [rspec-users] sharing specs in a subclass

2008-01-22 Thread Jonathan Linowes
cool thx :) On Jan 23, 2008, at 12:02 AM, David Chelimsky wrote: On Jan 22, 2008 10:49 PM, Jonathan Linowes [EMAIL PROTECTED] wrote: Hi I've spec'd a class and they pass. Now I'd like to assure that any subclass of this class also passes the same specs. Any suggestions for a clever

Re: [rspec-users] route_for and nested resources

2008-01-27 Thread Jonathan Linowes
Note, named routes cannot be accessed unless you have a response (eg after you've run a controller action) See http://rspec.lighthouseapp.com/projects/5645/tickets/201-enable- named-urls-before-response On Jan 27, 2008, at 8:26 PM, Matt Darby wrote: On Jan 27, 2008, at 8:05 PM, David

[rspec-users] view spec on rails questions

2008-03-10 Thread Jonathan Linowes
Hi I have a couple of questions 1) how do you test the response inside a content_for block I see reference to it in the release notes but dont know where to find it (tried http://rspec.info/rdoc-rails/ ) 2) I dont seem to be able to stub partials in a different directory eg %= render

Re: [rspec-users] Problems with form_for and partials

2008-03-12 Thread Jonathan Linowes
Has anyone come up with a solution for stubbing partials and passing form builders to it? i have a complex form with many parts, and those are rendered in partials On Oct 21, 2007, at 8:46 AM, rupert wrote: i'm having problem with a form_for situation where i'm trying to DRY out the

Re: [rspec-users] Problems with form_for and partials

2008-03-13 Thread Jonathan Linowes
instead of passing the form builder around, anyone? On Mar 13, 2008, at 5:05 AM, David Chelimsky wrote: On Wed, Mar 12, 2008 at 10:19 PM, Jonathan Linowes [EMAIL PROTECTED] wrote: On Mar 12, 2008, at 5:47 PM, David Chelimsky wrote: On Wed, Mar 12, 2008 at 9:43 PM, Zach Dennis [EMAIL PROTECTED

Re: [rspec-users] Problems with form_for and partials

2008-03-14 Thread Jonathan Linowes
seems like it'd make sense to just add this to http://code.google.com/ p/rspec-on-rails-matchers/ linoj On Mar 14, 2008, at 8:48 AM, Brandon Keepers wrote: Zach, On 3/14/08, Zach Moazeni [EMAIL PROTECTED] wrote: This hints at another extension I've wanted to write for us for a while.

Re: [rspec-users] rescue

2008-03-19 Thread Jonathan Linowes
yep, that did it :) thx On Mar 18, 2008, at 11:50 PM, Zach Dennis wrote: On Tue, Mar 18, 2008 at 11:13 PM, linojon [EMAIL PROTECTED] wrote: Hi, whats the correct way to spec a rescue? This will raise it but doesnt test my code's response # controller def edit @foo =

Re: [rspec-users] spec'ing models

2008-03-31 Thread Jonathan Linowes
for associations, among other things, i've been using http://rspec-on- rails-matchers.googlecode.com/svn/trunk/README linoj On Mar 31, 2008, at 8:33 PM, Anthony Broad-Crawford wrote: I have been using the following approach. Looking forward to see if anyone else does something better to

Re: [rspec-users] Has anyone pulled from the repo recently, but not on/after 4/16?

2008-04-16 Thread Jonathan Linowes
You might try here http://www.google.com.au/intl/en/gday/index.html Jonathan On Apr 16, 2008, at 3:23 PM, Pat Maddox wrote: Actually, if you updated the repo after 4/16, please send it to me. Also include any winning lotto numbers for the date of your last pull. In fact, screw the repo, I

Re: [rspec-users] BDD/Rails/Shoulda

2008-04-24 Thread Jonathan Linowes
I'm not sure this answers your questions, but you prompted me to share my experience. Personally i consider BDD just one tool in my toolbox. And I consider rspec to be as much a testing tool as a (BD)Development one. So I often find myself just taking the path of least resistance. And

Re: [rspec-users] Testing that named_scope is defined

2008-05-13 Thread Jonathan Linowes
On May 13, 2008, at 6:39 PM, Helder Ribeiro wrote: I'm not actually trying to test its behavior, quick! Duck! INCOMING...! ___ rspec-users mailing list rspec-users@rubyforge.org http://rubyforge.org/mailman/listinfo/rspec-users

Re: [rspec-users] [ANN/ADV] Scripted GUI Testing With Ruby book (uses RSpec)

2008-08-06 Thread Jonathan Linowes
Ian, sounds like your espresso machine needs some gui testing... :) On Aug 6, 2008, at 12:47 AM, Ian Dees wrote: Hi, all. The publishers have just thrown the switch to make my new book, Scripted GUI Testing With Ruby, available for purchase in both PDF and analog.

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

2008-08-06 Thread Jonathan Linowes
perhaps verbose but how about foo.should equal_in_any_order [1, 3, 1, 4, 2] On Aug 6, 2008, at 1:50 PM, Pat Maddox wrote: I've had a matcher in my head for a couple months, that I frequently want but never get around to writing because I can't think of the name for it. Here's how it

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

2008-08-06 Thread Jonathan Linowes
.should be_bag_of( [1, 3, 1, 4, 2] ) On Aug 6, 2008, at 2:33 PM, Steve Schafer wrote: On Wed, 6 Aug 2008 13:50:27 -0400, you wrote: I've had a matcher in my head for a couple months, that I frequently want but never get around to writing because I can't think of the name for it. Here's

[rspec-users] passing a hash in stories

2008-08-08 Thread Jonathan Linowes
Hi, Anyone have code you could share that lets you pass a hash in plain text stories, for example Then I fill out form with name: Jon, email: [EMAIL PROTECTED], age: 9 passes in a hash { 'name' = 'Jon', 'emal' = '[EMAIL PROTECTED]', 'age' = '9' }

Re: [rspec-users] passing a hash in stories

2008-08-08 Thread Jonathan Linowes
On Aug 8, 2008, at 1:43 PM, Ben Mabey wrote: Jonathan Linowes wrote: Hi, Anyone have code you could share that lets you pass a hash in plain text stories, for example Then I fill out form with name: Jon, email: [EMAIL PROTECTED], age: 9 passes in a hash { 'name' = 'Jon', 'emal' = '[EMAIL

Re: [rspec-users] How do you stub out callbacks?

2008-08-14 Thread Jonathan Linowes
Don't stub out callbacks, rather spec the behavior of the model, which might mean stubbing out methods (in a different model?) called by the callback. On Aug 14, 2008, at 9:53 AM, Rob Lacey wrote: Hi there, I'm trying to write a spec for and existing model. It has an after_create

Re: [rspec-users] problem with get and post methods.. require missing ?

2008-08-14 Thread Jonathan Linowes
and, is it SetupController or SetupsController ? On Aug 14, 2008, at 1:47 PM, David Chelimsky wrote: On Thu, Aug 14, 2008 at 12:42 PM, [EMAIL PROTECTED] wrote: Hello, I got an error when I run my spec test of a controlleur : the get and post methodes are unknown. here is my test file :

Re: [rspec-users] rake spec loads development environment

2008-08-19 Thread Jonathan Linowes
On Aug 19, 2008, at 2:05 PM, Satish Gunnu wrote: Hi, I am new to rspec and started implementing it on my project yesterday. I have followed the instructions and installed rspec gem and rspec plugin into my project. I created couple of sample stories and tried running the specs using spec

Re: [rspec-users] rake spec loads development environment

2008-08-19 Thread Jonathan Linowes
On Aug 19, 2008, at 5:08 PM, Jonathan Linowes wrote: On Aug 19, 2008, at 4:32 PM, Satish Gunnu wrote: Yes I think that is what's happening in my case. is this how it is supposed to work? or can we have rspec ignore the step to look at development environment. thanks so much for all your

Re: [rspec-users] Documentation for Plain-Text Stories

2008-08-20 Thread Jonathan Linowes
On Aug 20, 2008, at 2:20 AM, Aslak Hellesøy wrote: (In Cucumber it's Feature, not Story) no offense, but while you're being picky about names, I dont see too much difference between 'story' and 'feature' but 'cucumber' is a really random meaningless name

Re: [rspec-users] story vs feature (was Documentation for Plain-Text Stories)

2008-08-22 Thread Jonathan Linowes
On Aug 20, 2008, at 10:20 AM, David Chelimsky wrote: I see them as very different. User Stories are inputs to a development process and Features are the outputs. I decided to churn on this for a few days before responding. Actually I was going to let it drop, but kept thinking about it.

Re: [rspec-users] OT 'parts'

2008-08-25 Thread Jonathan Linowes
On Aug 24, 2008, at 4:18 PM, Jay Levitt wrote: David Chelimsky wrote: Agreed. Tools is tools. Process is process. (boat is boat ) And parts is parts. Let's not forget that: http://www.youtube.com/watch?v=OTzLVIc-O5E Jay OT, reminds me of when, a while back, I was developing CAD

Re: [rspec-users] story vs feature (was Documentation for Plain-Text Stories)

2008-08-25 Thread Jonathan Linowes
On Aug 24, 2008, at 12:31 PM, David Chelimsky wrote: In terms of the feature (which is the report), I see this as just another scenario. In terms of driving development and estimating effort, I see this as a new User Story. Does this clarify or further confuse? I see your scenario of

Re: [rspec-users] story vs feature (was Documentation for Plain-Text Stories)

2008-08-25 Thread Jonathan Linowes
On Aug 25, 2008, at 11:19 AM, aslak hellesoy wrote: On Mon, Aug 25, 2008 at 5:12 PM, Jonathan Linowes [EMAIL PROTECTED] wrote: On Aug 24, 2008, at 12:31 PM, David Chelimsky wrote: In terms of the feature (which is the report), I see this as just another scenario. In terms of driving

[rspec-users] uploads with webrat in stories

2008-08-29 Thread Jonathan Linowes
I've read through the messages on this list, and have file upload specs working in my model and controller tests, using :file = ActionController::TestUploadedFile.new(filepath) But its not working in stories using webrat. I've tried fills_in foo[file], :with = filepath and fills_in

Re: [rspec-users] uploads with webrat in stories

2008-08-29 Thread Jonathan Linowes
On Aug 29, 2008, at 12:52 PM, Ben Mabey wrote: Jonathan Linowes wrote: I've read through the messages on this list, and have file upload specs working in my model and controller tests, using :file = ActionController::TestUploadedFile.new(filepath) But its not working in stories using webrat

Re: [rspec-users] uploads with webrat in stories

2008-08-29 Thread Jonathan Linowes
On Aug 29, 2008, at 1:19 PM, Jonathan Linowes wrote: i am trying that too, but at this point in my story i dont actually have the current record object to generate the form action path. How would i extract the :action = path from the form in the current response.body ? got

Re: [rspec-users] uploads with webrat in stories

2008-08-29 Thread Jonathan Linowes
On Aug 29, 2008, at 1:58 PM, Christopher Bailey wrote: I too would suggest trying attaches_file. I use it in a few different stories I have, and it works fine for me. I don't believe I'm doing anything nonstandard. Here's the basics of what yep, works for me :)

Re: [rspec-users] story vs feature (was Documentation for Plain-Text Stories)

2008-08-31 Thread Jonathan Linowes
On Aug 31, 2008, at 7:56 AM, Matt Wynne wrote: On 30 Aug 2008, at 19:31, Scott Taylor wrote: On Aug 30, 2008, at 2:12 PM, Tero Tilus wrote: 2008-08-30 17:02, Matt Wynne: RuBehave Now _that's_ cool! I love it! Personally, I always liked the rbehave / rspec combo, of Mike Myers Ali

Re: [rspec-users] story vs feature (was Documentation for Plain-Text Stories)

2008-08-31 Thread Jonathan Linowes
On Aug 31, 2008, at 9:39 AM, David Chelimsky wrote: Agreed. Stories and/or Features seem to be more about organization and communication. Scenarios drive code development. +1 I also like to organize them into workflows, tasks, goals Which makes me think maybe the scenario should be a more

[rspec-users] opening a response in browser (webrat)

2008-09-01 Thread Jonathan Linowes
Given I am running an rspec story And it uses webrat And I am using rdebug When I am at a breakpoint (eg after a 'visits' in a step) Then how can I open the current response in a browser to see what the page actually looks like at that point? ___

Re: [rspec-users] opening a response in browser (webrat)

2008-09-01 Thread Jonathan Linowes
response.body } And then in terminal I go to my project root and type open public/duh.html. Although you may be able to get away with doing this in your debugging session: system open #{RAILS_ROOT}/public/duh.html HTH, Zach On Mon, Sep 1, 2008 at 1:28 PM, Jonathan Linowes [EMAIL PROTECTED] wrote

Re: [rspec-users] Setting instance variables for controllers

2008-09-03 Thread Jonathan Linowes
On Sep 3, 2008, at 10:53 AM, Scott Taylor wrote: On Sep 3, 2008, at 10:40 AM, Maurício Linhares wrote: You don't need to set the instance variable, you can stub the find call: Or you could also stub the call to User::find. Also - you don't *WANT* to set the instance variable - it's an

Re: [rspec-users] specifying a controller's layout

2008-09-04 Thread Jonathan Linowes
noting my own typo def negeative_failure_message should be def negative_failure_message :) On Sep 4, 2008, at 10:24 AM, Matt Wynne wrote: Thanks David. I really struggled to get that to catch anything. My colleague Dan found this, which is working well for me:

[rspec-users] scenarios on production data

2008-09-04 Thread Jonathan Linowes
I'm just thinking out loud here... It could be useful to have a way to run scenarios on a copy of a fully populated production database, as an alternative to normal use. Not sure how that'd work, maybe replace the Given's but leave the Whens and Thens? linoj

Re: [rspec-users] scenarios on production data

2008-09-05 Thread Jonathan Linowes
On Sep 5, 2008, at 11:50 AM, Ashley Moran wrote: On 4 Sep 2008, at 18:55, Jonathan Linowes wrote: I'm just thinking out loud here... It could be useful to have a way to run scenarios on a copy of a fully populated production database, as an alternative to normal use. Not sure how that'd

Re: [rspec-users] scenarios on production data

2008-09-05 Thread Jonathan Linowes
On Sep 5, 2008, at 1:27 PM, Mark Wilden wrote: On Fri, Sep 5, 2008 at 9:11 AM, Jonathan Linowes [EMAIL PROTECTED] wrote: That is, if my stories run with my well controlled, relatively small setups, I'd like to ensure they run on a large, fully populated, somewhat 'random' set of real

Re: [rspec-users] 2nd attempt at mocking and stubbing

2008-09-05 Thread Jonathan Linowes
On Sep 5, 2008, at 5:44 PM, Nick Hoffman wrote: Property.stub!(:find).and_return mock_property1, mock_property2 try Property.stub!(:find).and_return( [mock_property1, mock_property2] ) Want to help others? Become a certified

Re: [rspec-users] Best practices for sharing state between story steps?

2008-09-08 Thread Jonathan Linowes
On Sep 7, 2008, at 7:58 PM, Sam Stokes wrote: What approaches do people use to achieve this? Perhaps I'm bucking what others have advised against, so take it for what it's worth. I make some limited use of global (instance) variables that correspond to english language pronouns. I have

Re: [rspec-users] scenarios on production data

2008-09-08 Thread Jonathan Linowes
On Sep 8, 2008, at 12:35 PM, Dan North wrote: 2008/9/8 Jonathan Linowes [EMAIL PROTECTED] On 4 Sep 2008, at 18:55, Jonathan Linowes wrote: I'm just thinking out loud here... It could be useful to have a way to run scenarios on a copy of a fully populated production database

Re: [rspec-users] help on skipping a before_filter for a story

2008-09-08 Thread Jonathan Linowes
On Sep 8, 2008, at 8:49 PM, Eric Harris-Braun wrote: Hi folks, I'm hoping for a bit of help on best-practices for skipping a before_filter when running a particular step. Specifically the authentication filter. What happens is that the post (see code below) returns a redirect response to

Re: [rspec-users] help on skipping a before_filter for a story

2008-09-08 Thread Jonathan Linowes
= 'secret') post_via_redirect /sessions, :login = 'user', :password = secret, response.should be_success session[:user].should == user.id end On Sep 8, 2008, at 10:47 PM, Jonathan Linowes wrote: On Sep 8, 2008, at 8:49 PM, Eric Harris-Braun wrote: Hi folks, I'm hoping

Re: [rspec-users] Best practices for sharing state between story steps?

2008-09-10 Thread Jonathan Linowes
of course, there's one 'global' shared between steps that we cant live without: response :) ___ rspec-users mailing list rspec-users@rubyforge.org http://rubyforge.org/mailman/listinfo/rspec-users

[rspec-users] form_for url

2008-09-12 Thread Jonathan Linowes
hi, I'm specing a view that contains % form_for @page, :url = { :action = :update },... and get the error No route matches {:action=update} In the spec, I've tried several things, including it should work do assigns[:page] = mock_model(Page) request.env[HTTP_REFERER] =

[rspec-users] w3 validation

2008-09-15 Thread Jonathan Linowes
Hi, suggestions how to add w3 validation to a story step? eg Then the page should be valid tia linoj ___ rspec-users mailing list rspec-users@rubyforge.org http://rubyforge.org/mailman/listinfo/rspec-users

Re: [rspec-users] w3 validation

2008-09-16 Thread Jonathan Linowes
On Sep 15, 2008, at 6:16 PM, Zach Dennis wrote: On Mon, Sep 15, 2008 at 5:32 PM, Jonathan Linowes [EMAIL PROTECTED] wrote: Hi, suggestions how to add w3 validation to a story step? eg Then the page should be valid You could write a then step that takes the current response.body, uploads

Re: [rspec-users] Cucumber Scenario syntax

2008-09-18 Thread Jonathan Linowes
On Sep 12, 2008, at 4:01 PM, Joseph Wilk wrote: Evan David Light wrote: On Sep 12, 2008, at 12:26 PM, David Chelimsky wrote: I believe that binding the table to the phrasing would be immensely useful and perhaps even crucial to Scenario authors. Can you give an example of how this

Re: [rspec-users] workflow: user = stories/features = spec = code = user

2008-09-19 Thread Jonathan Linowes
sometimes i do story = code = spec = (re)code = story step = (re)code = spec = (re)code or whatever, but hey, thats just me... :) ___ rspec-users mailing list rspec-users@rubyforge.org http://rubyforge.org/mailman/listinfo/rspec-users

[rspec-users] help with webrat and selectors

2008-09-19 Thread Jonathan Linowes
Hi, sorry if this isnt directly an rspec question but maybe someone can help lets say a page contains a list setup like this ul id=list li id=item_1a href=#Item One/a/li li id=item_2a href=#Item Two/a/li li id=item_3a href=#Item Three/a/li /ul in my story i want to refer to first item,

Re: [rspec-users] help with webrat and selectors

2008-09-19 Thread Jonathan Linowes
nevermind, hpricot to the rescue :) On Sep 19, 2008, at 3:01 PM, Jonathan Linowes wrote: Hi, sorry if this isnt directly an rspec question but maybe someone can help lets say a page contains a list setup like this ul id=list li id=item_1a href=#Item One/a/li li id=item_2a href=#Item Two

Re: [rspec-users] BDD / cucumber thought - chaining 'Then' steps with Which

2008-09-26 Thread Jonathan Linowes
On Sep 26, 2008, at 9:06 AM, Matt Wynne wrote: FWIW, I think it's rather nice. We went through a fad of using @it for a while, and now we have a stuff[] hash. Both similar ideas - there must be something in this. I'm doing the same thing. I had @current_project, @current_page etc (

Re: [rspec-users] rake spec defaults to devel env

2008-09-26 Thread Jonathan Linowes
On Sep 26, 2008, at 1:36 PM, Tero Tilus wrote: I was experiencing the weirdest behavior (rake spec running fine without a test database) the other day. Turned out that actually rake spec was (and has been for heavens know how long for me) running in development environment. However

  1   2   >