Re: [rspec-users] Proper Encapsulation of SQL WHERE / ORDER BY Clauses

2008-08-18 Thread Matt Wynne
Thanks for the reminder. This stuff is in a protected admin area so I don't really care, but I should play on the safe side anyhow. cheers, Matt http://blog.mattwynne.net http://songkick.com In case you wondered: The opinions expressed in this email are my own and do not necessarily ref

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

2008-08-18 Thread Jim Morris
aslak hellesoy wrote: I'm inviting you to provide some constructive feedback about how we could improve it to make the transition easier for people like yourself. I'll give it a try, I'll port some of my stories to cucumber and see how it goes. A natural part of software evolution is that

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

2008-08-18 Thread aslak hellesoy
On Mon, Aug 18, 2008 at 9:46 PM, Jim Morris <[EMAIL PROTECTED]> wrote: > aslak hellesoy wrote: > >> >> The RSpec Story runner is likely to be deprecated in favour of the new >> feature runner (temporarily called Cucumber). >> http://www.nabble.com/-ANN--Cucumber-td18876816.html > > This is REALLY b

Re: [rspec-users] Proper Encapsulation of SQL WHERE / ORDER BY Clauses

2008-08-18 Thread Mark Wilden
On Mon, Aug 18, 2008 at 1:26 PM, Matt Wynne <[EMAIL PROTECTED]> wrote: > def get_where_clause > >clause = [] > >clause << "city_id = [EMAIL PROTECTED]" if @city_id >clause << "name like '[EMAIL PROTECTED]'" if @name > I think you've still got SQL injection problems he

Re: [rspec-users] Proper Encapsulation of SQL WHERE / ORDER BY Clauses

2008-08-18 Thread Matt Wynne
Thanks Scott. I refactored it today to use what I called a QueryAdapter, namespaced inside the model. It basically subclasses Hash, takes the params from the controller into the constructor, and becomes the hash to be sent to find_all. I feels much better, as I now have the code that's coup

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

2008-08-18 Thread David Chelimsky
On Mon, Aug 18, 2008 at 2:46 PM, Jim Morris <[EMAIL PROTECTED]> wrote: > aslak hellesoy wrote: > >> >> The RSpec Story runner is likely to be deprecated in favour of the new >> feature runner (temporarily called Cucumber). >> http://www.nabble.com/-ANN--Cucumber-td18876816.html > > This is REALLY b

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

2008-08-18 Thread Jim Morris
aslak hellesoy wrote: The RSpec Story runner is likely to be deprecated in favour of the new feature runner (temporarily called Cucumber). http://www.nabble.com/-ANN--Cucumber-td18876816.html This is REALLY bad news!! I asked this question a while back, I have a LOT of code using story runne

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

2008-08-18 Thread Aslak Hellesøy
On Aug 18, 2008, at 8:57 PM, aidy lewis wrote: Hi, Bret Pettichord tells me yourself and him worked together on an improvement to the watir example. Could you commit it and i will expand on it and wrap it up into an AUT object model. Aidy. Hi Aidy. So you and I have the same Bret number eh?

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

2008-08-18 Thread aidy lewis
Hi, Bret Pettichord tells me yourself and him worked together on an improvement to the watir example. Could you commit it and i will expand on it and wrap it up into an AUT object model. Aidy. On 8/18/08, aslak hellesoy <[EMAIL PROTECTED]> wrote: > On Mon, Aug 18, 2008 at 3:31 PM, aidy lewis <[EMA

Re: [rspec-users] Do you remember RSpactor?

2008-08-18 Thread Dan North
The runtime environment for OSX GUI apps is controlled by an (optional) file called ~/.MacOSX/environment.plist, which you can edit using the Property List Editor. Under the Root node you create key-value pairs like: GEM_HOME => /Users/Dan/Library/gems. Property List Editor won't let you create a

Re: [rspec-users] command line options in story runner run method

2008-08-18 Thread David Chelimsky
On Mon, Aug 18, 2008 at 12:01 PM, aidy lewis <[EMAIL PROTECTED]> wrote: > Hi, > > 2008/8/18 aidy lewis <[EMAIL PROTECTED]>: >> Hi, >> >> Can anyone give me some sample syntax of using a command line switch >> in the Story Runner run method please? > > This is what I have > > def run_local_story(fil

Re: [rspec-users] command line options in story runner run method

2008-08-18 Thread aidy lewis
Hi, 2008/8/18 aidy lewis <[EMAIL PROTECTED]>: > Hi, > > Can anyone give me some sample syntax of using a command line switch > in the Story Runner run method please? This is what I have def run_local_story(filename, options={}) options = {"-fh:" => "C:/rspec_reports/#{filename}.htm"} run Fil

Re: [rspec-users] Argument Constraints where the Argument is a Hash

2008-08-18 Thread David Chelimsky
On Aug 18, 2008, at 11:10 AM, Matt Wynne <[EMAIL PROTECTED]> wrote: Hi folks, I have an object whose constructor I want to stub, specifying that it should be passed a hash containing an expected set of key / value pairs. Note that the actual hash might contain more key / value pairs,

Re: [rspec-users] Argument Constraints where the Argument is a Hash

2008-08-18 Thread Matt Wynne
Okay, I realised the with() is calling the == method on whatever you pass in, so I did this: module EquateAnyHashContainingAllMyElements def ==(other) self.keys.all? do |key| other.has_key?(key) end end end ex

[rspec-users] Argument Constraints where the Argument is a Hash

2008-08-18 Thread Matt Wynne
Hi folks, I have an object whose constructor I want to stub, specifying that it should be passed a hash containing an expected set of key / value pairs. Note that the actual hash might contain more key / value pairs, but I don't care, as long as my expected ones are there I thought I migh

[rspec-users] command line options in story runner run method

2008-08-18 Thread aidy lewis
Hi, Can anyone give me some sample syntax of using a command line switch in the Story Runner run method please? Thanks Aidy ___ rspec-users mailing list rspec-users@rubyforge.org http://rubyforge.org/mailman/listinfo/rspec-users

Re: [rspec-users] rspec book

2008-08-18 Thread David Chelimsky
On Mon, Aug 18, 2008 at 9:53 AM, Andy Orahood <[EMAIL PROTECTED]> wrote: > David Chelimsky wrote: >> On Jun 16, 2008, at 6:37 AM, Juanma Cervera wrote: >>> When can we expect it to arrive? >> >> Assuming no set-backs, beta by mid-summer. >> >> Cheers, >> David > > Oh I hope so. Is the beta close?

Re: [rspec-users] rspec book

2008-08-18 Thread Andy Orahood
David Chelimsky wrote: > On Jun 16, 2008, at 6:37 AM, Juanma Cervera wrote: >> When can we expect it to arrive? > > Assuming no set-backs, beta by mid-summer. > > Cheers, > David Oh I hope so. Is the beta close? -- Posted via http://www.ruby-forum.com/. _

Re: [rspec-users] Autotest and subclasses / namespaces

2008-08-18 Thread David Chelimsky
On Mon, Aug 18, 2008 at 8:39 AM, Matt Wynne <[EMAIL PROTECTED]> wrote: > On 18 Aug 2008, at 14:27, David Chelimsky wrote: >>> >>> Check out the output from autotest: >>> >>> /usr/local/bin/ruby -S script/spec -O spec/spec.opts >>> >>> /Users/matt/Documents/projects/songkick/skweb/app/controllers/ad

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

2008-08-18 Thread aslak hellesoy
On Mon, Aug 18, 2008 at 3:31 PM, aidy lewis <[EMAIL PROTECTED]> wrote: > Aslak > > 2008/8/18 aslak hellesoy <[EMAIL PROTECTED]>: > >> >> What do you mean by expand? >> >> Aslak >> > > I was going to give a more detailed example... > That would be awesome. If you're familiar with Git you can clone

Re: [rspec-users] Autotest and subclasses / namespaces

2008-08-18 Thread Matt Wynne
On 18 Aug 2008, at 14:27, David Chelimsky wrote: Check out the output from autotest: /usr/local/bin/ruby -S script/spec -O spec/spec.opts /Users/matt/Documents/projects/songkick/skweb/app/controllers/ admin/cities_controller.rb The fact that autotest is trying to load the controller file itse

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

2008-08-18 Thread aidy lewis
Aslak 2008/8/18 aslak hellesoy <[EMAIL PROTECTED]>: > > What do you mean by expand? > > Aslak > I was going to give a more detailed example... Aidy ___ rspec-users mailing list rspec-users@rubyforge.org http://rubyforge.org/mailman/listinfo/rspec-user

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

2008-08-18 Thread aslak hellesoy
On Mon, Aug 18, 2008 at 3:02 PM, aidy lewis <[EMAIL PROTECTED]> wrote: > Aslak > >> Look in the examples/watir directory: >> http://github.com/aslakhellesoy/cucumber/tree/master/examples/watir >> >> Aslak >> > OK. Can I expand on this for your example? > What do you mean by expand? Aslak > Aidy

Re: [rspec-users] Autotest and subclasses / namespaces

2008-08-18 Thread David Chelimsky
On Mon, Aug 18, 2008 at 8:20 AM, Matt Wynne <[EMAIL PROTECTED]> wrote: > Nope, despite my efforts to repro this earlier, it's started happening > again. > > Check out the output from autotest: > > /usr/local/bin/ruby -S script/spec -O spec/spec.opts > /Users/matt/Documents/projects/songkick/skweb/a

Re: [rspec-users] Autotest and subclasses / namespaces

2008-08-18 Thread Matt Wynne
Nope, despite my efforts to repro this earlier, it's started happening again. Check out the output from autotest: /usr/local/bin/ruby -S script/spec -O spec/spec.opts /Users/matt/ Documents/projects/songkick/skweb/app/controllers/admin/ cities_controller.rb spec/controllers/admin/cities_con

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

2008-08-18 Thread aidy lewis
Aslak > Look in the examples/watir directory: > http://github.com/aslakhellesoy/cucumber/tree/master/examples/watir > > Aslak > OK. Can I expand on this for your example? Aidy ___ rspec-users mailing list rspec-users@rubyforge.org http://rubyforge.org/m

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

2008-08-18 Thread aslak hellesoy
On Mon, Aug 18, 2008 at 2:29 PM, aidy lewis <[EMAIL PROTECTED]> wrote: > Hi Aslak > > > 2008/8/18 aslak hellesoy <[EMAIL PROTECTED]>: >> * How to use with Watir > > gem sources --add http://gems.github.com/ > gem install aslakhellesoy-cucumber > > I am unable top find the Watir and Cucumber example

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

2008-08-18 Thread aidy lewis
Hi Aslak 2008/8/18 aslak hellesoy <[EMAIL PROTECTED]>: > * How to use with Watir gem sources --add http://gems.github.com/ gem install aslakhellesoy-cucumber I am unable top find the Watir and Cucumber example Aidy ___ rspec-users mailing list rspec-

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

2008-08-18 Thread aslak hellesoy
On Mon, Aug 18, 2008 at 1:24 PM, Matt Wynne <[EMAIL PROTECTED]> wrote: > I think it's better to make them separate. Conceptually, the story runner > slightly confuses the identity of what RSpec is - is it for specifying > behaviour of individual classes (a la TDD) or is it for specifying the > beha

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

2008-08-18 Thread Matt Wynne
I think it's better to make them separate. Conceptually, the story runner slightly confuses the identity of what RSpec is - is it for specifying behaviour of individual classes (a la TDD) or is it for specifying the behaviour of the whole system? I think the describe / it / should thing is

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

2008-08-18 Thread aslak hellesoy
On Mon, Aug 18, 2008 at 1:06 PM, Matt Wynne <[EMAIL PROTECTED]> wrote: >> >> The RSpec Story runner is likely to be deprecated in favour of the new >> feature runner (temporarily called Cucumber). >> http://www.nabble.com/-ANN--Cucumber-td18876816.html >> > > And this is going to be distributed as

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

2008-08-18 Thread Matt Wynne
The RSpec Story runner is likely to be deprecated in favour of the new feature runner (temporarily called Cucumber). http://www.nabble.com/-ANN--Cucumber-td18876816.html And this is going to be distributed as a separate plug-in from RSpec? ___ rspec-

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

2008-08-18 Thread aslak hellesoy
On Tue, Aug 12, 2008 at 6:45 PM, Matt Wynne <[EMAIL PROTECTED]> wrote: > Can I help the project by writing some docs about the plain-text story > runner for the rspec.info website? It would surely help me to get it wired > in my own mind if I have to write it up for the world. > Would this be helpf

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

2008-08-18 Thread Joseph Wilk
Hello, I left out of my Rspec story post Selenium/Webrat integration. I thought I would release that as a separate post. While I can write about how I deal with Selenium/Webrat in Rspec I'm yet to use Watir. So I think putting something together on Watir integration as Matt suggested would be rea

Re: [rspec-users] Autotest and subclasses / namespaces

2008-08-18 Thread Matt Wynne
Thanks for the tips Ben. We upgraded to Rails 2.1 (from 1.x) on Friday and this seems to have gone away. I'll report back though if I learn anything else. cheers, Matt http://blog.mattwynne.net On 16 Aug 2008, at 20:32, Ben Mabey wrote: Matt Wynne wrote: I am writing a controller adm

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

2008-08-18 Thread Matt Wynne
That would be cool, though I think it might be hard to compete with something like this: http://www.joesniff.co.uk/ruby/telling-a-good-story-rspec-stories- from-the-trenches.html cheers, Matt http://blog.mattwynne.net On 18 Aug 2008, at 08:34, aidy lewis wrote: Matt, Do you want to p

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

2008-08-18 Thread aidy lewis
Matt, Do you want to pair on this? I am writing some stuff for the Watir site. I sent you some example code as well. Aidy On 12/08/2008, Matt Wynne <[EMAIL PROTECTED]> wrote: > > Can I help the project by writing some docs about the plain-text story > runner for the rspec.info website? It would