Hi Dan,
Thanks for the analysis. Yes I am a strong proponent of using the best
tools for the job, even it means bending the rules.
I like the view of the stakeholder being another program, it certainly
will make the phrasing of the header easier as I was struggling with
that.
> One other questio
The bottom line here is in understanding who is the stakeholder for this
story - i.e. who cares about it, who will read it and who wants to know when
it goes wrong.
It seems to me you are using the construct of scenarios to describe machine
interactions: the request and response of service invocat
Ok here is my sugar, put in spec_helper.rb
require 'rubygems'
require 'spec'
require 'spec/story'
# simulate before(:all) and after(:all) for stories
class MyListener
def set_before(&block)
@before= block
end
def set_after(&block)
@after= block
end
def method_missing sym, *arg
Yep thats exactly the case, an entire Story specific setup/teardown
for the Given, When Language API
Scenario setup is obviously done in the Given, although a way to clean
up if the spec fails would be nice.
The listener works fine for this, its just not a very intuitive way of
setting things up.
Jim Morris wrote:
Hi, Not top posting (although I prefer it ;)
Cool. Are you talking directly through ruby constructs or through a
browser tool like selenium?
I have a helper that makes posts and gets and deletes and puts
directly to the server which is implements a mostly REST-ful AP
Hi, Not top posting (although I prefer it ;)
>
> Cool. Are you talking directly through ruby constructs or through a
> browser tool like selenium?
I have a helper that makes posts and gets and deletes and puts
directly to the server which is implements a mostly REST-ful API and
written in Java.
I
On Jun 17, 2008, at 10:41 AM, Ben Mabey wrote:
David Chelimsky wrote:
Reordered your posts so my comments make sense (we prefer to avoid
top-posting - even though I sometimes violate that myself :) ).
On Jun 16, 11:58 pm, Jim Morris <[EMAIL PROTECTED]> wrote:
I'm not using Rails, I am doin
David Chelimsky wrote:
Reordered your posts so my comments make sense (we prefer to avoid
top-posting - even though I sometimes violate that myself :) ).
On Jun 16, 11:58 pm, Jim Morris <[EMAIL PROTECTED]> wrote:
I'm not using Rails, I am doing end to end integration testing talking
to
Reordered your posts so my comments make sense (we prefer to avoid
top-posting - even though I sometimes violate that myself :) ).
> On Jun 16, 11:58 pm, Jim Morris <[EMAIL PROTECTED]> wrote:
>> I'm not using Rails, I am doing end to end integration testing talking
>> to the server via net/http, s
Ahh ok think I found it...
In my test file at the start...
class MyListener
def method_missing sym, *args, &block
# ignore all messages you don't care about
end
def story_started(title, narrative)
puts "...Started story #{title}"
end
def story_ended(title, narrative)
puts
I'm not using Rails, I am doing end to end integration testing talking
to the server via net/http, so RailsStory is not involved.
I think the listeners may do it, I can use story_started like
before(:all) and story_ended like after(:all) which will be great,
presuming story_ended is always called
On Jun 16, 2008, at 6:18 PM, Jim Morris wrote:
Along similar lines is there a way to do the equivalent of
before(:all) and after(:all) or after(:each) in stories?
Basically I have a similar situation as above, but I need to make sure
the user is logged out after each scenario. or that the user
Along similar lines is there a way to do the equivalent of
before(:all) and after(:all) or after(:each) in stories?
Basically I have a similar situation as above, but I need to make sure
the user is logged out after each scenario. or that the user is logged
in once at the start of all scenarios th
On Jun 14, 2008, at 5:03 AM, Mikel Lindsaar 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
Things have evolved a bit since Story Runner first came out. The
approach you a
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
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 method in helper.rb which sets
up the state so that the user can browse the website.
Later
16 matches
Mail list logo