Re: [rspec-users] sharing story steps

2008-03-20 Thread aslak hellesoy
On Thu, Mar 20, 2008 at 5:44 AM, Joe Van Dyk <[EMAIL PROTECTED]> wrote: > Hi, > > How can I have a common set of steps that all my stories share? > > i.e. My stories often start out looking like this: > > Given a user Joe > Given a user Jordan > > then: put this in steps/users.rb: steps_for(

Re: [rspec-users] Attachment-fu + Story Runner

2008-03-20 Thread Rick DeNatale
On 3/20/08, Joe Van Dyk <[EMAIL PROTECTED]> wrote: > What was the resolution on this? How do you people test uploads with > rspec stories? I submitted a Rails patch to address the underlying problem http://dev.rubyonrails.org/ticket/11091 It got in as changeset 8978 and should be in edge rails.

Re: [rspec-users] `const_missing': uninitialized constant Spec::Rails

2008-03-20 Thread Dmitry Vanidovsky
Dmitry Vanidovsky wrote: > Have anyone had similar problem? What is by experience the most > suiteable version of rspec framework for rails 1.1.2? Thanks! It appeared rspec/rspec_on_rails version 1.0.8 runs without errors for env described obove. (used svn co for dovnloading rspec/rspec_on_rails)

Re: [rspec-users] cleaning up after stories

2008-03-20 Thread Rick DeNatale
On 3/20/08, Tero Tilus <[EMAIL PROTECTED]> wrote: > On Wed, 19 Mar 2008, Joe Van Dyk wrote: > > do I have to manually clear out the database after a story runs? > > > I'm wondering the same, but with specs. Database gets dirty and > tests start to fail when i repeatedly do rake spec. >From what

[rspec-users] Combining autotest, rspec, rspec_on_rails and spec-server

2008-03-20 Thread Anthony Carlos
Hello, I've been trying to google the definitive way to combine autotest, rspec, and spec-server, but to no avail. It seems like there are lots of suggestions from old versions. Furthermore, some commands such as rake:autotest don't seem to be around anymore. So, is it required to install Z

[rspec-users] Command line option to run a story scenario?

2008-03-20 Thread Martin Sadler
Hi Folks, Quick question. Anybody know if there is a command line option to run an individual scenario for the given story e.g. something like: ruby stories/my_story.rb -s "the name of the scenario" Thanks in advance, Martin. PS: Really loving story runner at the moment. Got it hooked up wi

Re: [rspec-users] rspec groups?

2008-03-20 Thread Edvard Majakari
On Wed, Mar 19, 2008 at 1:12 AM, Ashley Moran <[EMAIL PROTECTED]> wrote: > > sufficient to me, but of course, YNMDFTOM. > Please put me out of my misery and explain the acronym :D My bad. My favorite hobby is to invent new acronyms on the fly, of which the one concerned is an example. It is sh

Re: [rspec-users] rspec groups?

2008-03-20 Thread Max Williams
Edvard Majakari wrote: > On Wed, Mar 19, 2008 at 1:12 AM, Ashley Moran > <[EMAIL PROTECTED]> wrote: > >> > sufficient to me, but of course, YNMDFTOM. > >> Please put me out of my misery and explain the acronym :D > > My bad. My favorite hobby is to invent new acronyms on the fly, of > which th

Re: [rspec-users] ApplicationHelper

2008-03-20 Thread Corey Haines
You could just write specs for ApplicationHelper::distribute -Corey On Wed, Mar 19, 2008 at 3:55 PM, nzook <[EMAIL PROTECTED]> wrote: > > When working with views, I use instance methods of ApplicationHelper: > > # app/helpers/application_helper.rb: > module ApplicationHelper > def distribute(to

Re: [rspec-users] ApplicationHelper

2008-03-20 Thread Corey Haines
If I need to have it interact with the object it is mixed into, I usually put the following above my examples class TestMixer include MyMixIn end or, even, class TestMixer end then, in the spec, TestMixer.include MyMixIn On Thu, Mar 20, 2008 at 2:30 PM, Corey Haines <[EMAIL PROTECTED]> w

Re: [rspec-users] ApplicationHelper

2008-03-20 Thread James Deville
That shouldn't be needed. In my spec's it works fine. does: describe ApplicationHelper do it "doesn't find what it's looking for do helper.distribute(1,2,3,[4,5,6]).should eql([1,2,3]) end end work? I know that there was some talk of introducing an explicit helper object on the list. JD

[rspec-users] stories with selenium and the db

2008-03-20 Thread Ivo Dancet
Hi all Tonight I wanted to test out selenium in a story to test some ajax stuff on a page. After struggling for an hour or two with disappearing database objects I found the solution in a blog post by Kerry Buckley. with the comment included it reads: # Don't add an ActiveRecordSafetyListen

Re: [rspec-users] rspec groups?

2008-03-20 Thread Ashley Moran
On 20 Mar 2008, at 14:31, Max Williams wrote: > Sorry to be pedantic, but shouldn't that be > "Your needs may differ from mine"? There's no party called 'mine', so > 'mine' has no needs :) A quick google for "those of mine" brings back a google book hit for Shakespeare so maybe Edvard was bei

Re: [rspec-users] stories with selenium and the db

2008-03-20 Thread Ashley Moran
On 20 Mar 2008, at 22:58, Ivo Dancet wrote: Hi all Tonight I wanted to test out selenium in a story to test some ajax stuff on a page. After struggling for an hour or two with disappearing database objects I found the solution in a blog post by Kerry Buckley. with the comment included it rea

[rspec-users] Oh inheritacne, wherefore art thou

2008-03-20 Thread Pietro Mascagni
Is there anyway to achieve inheritance of specifications? Suppose I had an action like def index filter = params[:filter] ? params[:filter] : '%' order = params[:order] ? params[:order] : 'created_at DESC' @posts = Post.find(:conditions => "title LIKE #{filter}", :order => order) ... end

Re: [rspec-users] Oh inheritacne, wherefore art thou

2008-03-20 Thread Corey Haines
Look up SharedExamplesGroups http://rspec.info/rdoc/ On Thu, Mar 20, 2008 at 9:03 PM, Pietro Mascagni <[EMAIL PROTECTED]> wrote: > Is there anyway to achieve inheritance of specifications? > > Suppose I had an action like > > def index > filter = params[:filter] ? params[:filter] : '%' > order

Re: [rspec-users] Combining autotest, rspec, rspec_on_rails and spec-server

2008-03-20 Thread Scott Taylor
On Mar 20, 2008, at 8:56 AM, Anthony Carlos wrote: Hello, I've been trying to google the definitive way to combine autotest, rspec, and spec-server, but to no avail. It seems like there are lots of suggestions from old versions. Furthermore, some commands such as rake:autotest don't seem to be

Re: [rspec-users] Oh inheritacne, wherefore art thou

2008-03-20 Thread Pat Maddox
On Thu, Mar 20, 2008 at 6:03 PM, Pietro Mascagni <[EMAIL PROTECTED]> wrote: > Is there anyway to achieve inheritance of specifications? > > Suppose I had an action like > > def index > filter = params[:filter] ? params[:filter] : '%' > order = params[:order] ? params[:order] : 'created_at DES

Re: [rspec-users] Oh inheritacne, wherefore art thou

2008-03-20 Thread Scott Taylor
On Mar 20, 2008, at 11:47 PM, Corey Haines wrote: Look up SharedExamplesGroups http://rspec.info/rdoc/ Yep - and "it_should_behave_like". SharedExampleGroups subclass Module, so it fits in with the "inheritance" idea quite nicely. Scott On Thu, Mar 20, 2008 at 9:03 PM, Pietro Masc

Re: [rspec-users] cleaning up after stories

2008-03-20 Thread Joe Van Dyk
On Thu, Mar 20, 2008 at 4:02 AM, Rick DeNatale <[EMAIL PROTECTED]> wrote: > On 3/20/08, Tero Tilus <[EMAIL PROTECTED]> wrote: > > On Wed, 19 Mar 2008, Joe Van Dyk wrote: > > > do I have to manually clear out the database after a story runs? > > > > > > I'm wondering the same, but with specs.

Re: [rspec-users] sharing story steps

2008-03-20 Thread Joe Van Dyk
On Thu, Mar 20, 2008 at 2:05 AM, aslak hellesoy <[EMAIL PROTECTED]> wrote: > On Thu, Mar 20, 2008 at 5:44 AM, Joe Van Dyk <[EMAIL PROTECTED]> wrote: > > Hi, > > > > How can I have a common set of steps that all my stories share? > > > > i.e. My stories often start out looking like this: > >

Re: [rspec-users] Attachment-fu + Story Runner

2008-03-20 Thread Joe Van Dyk
On Thu, Mar 20, 2008 at 3:34 AM, Rick DeNatale <[EMAIL PROTECTED]> wrote: > On 3/20/08, Joe Van Dyk <[EMAIL PROTECTED]> wrote: > > What was the resolution on this? How do you people test uploads with > > rspec stories? > > I submitted a Rails patch to address the underlying problem > http://d