I have now managed to get the example to run as expected from The
RSpec Book.
I would appreciate pointers on the following though:
> As an aside, I already have an implemented model that I'd like to use
> in my controller spec. In this case, should I be using stub_model() to
> make use of it e.g.
On 15 May 2009, at 07:01, Luke Melia wrote:
I'm trying to make sure that my cucumber selenium suite fails if my
Rails app returns any 500 response codes. I'm working on what the
best way to identify this state, but the question I'd like to put to
the list is this: If I want to check for th
> I'm trying to make sure that my cucumber selenium suite fails if my Rails
> app returns any 500 response codes. I'm working on what the best way to
> identify this state, but the question I'd like to put to the list is this:
> If I want to check for this error condition in an After or AfterStep,
Seem to be having a problem with the new releases 0.3.5 which
completely breaks my rake tasks http://gist.github.com/112149.
WIth the
t.fork = true # Explicitly fork for cucumber 0.3.4 and rails
lines added to the tasks none of my steps are recognised (see second
file in gists)
Without t.fork
On Fri, May 15, 2009 at 9:25 AM, aslak hellesoy wrote:
>
> I'm not so sure I like the idea of AfterStep - smells like a
> workaround for something that belongs elsewhere. Can't your have
> selenium-rc (or a helper method you create around it) raise those
> exceptions?
>
> Given /bla/ do
> # don't
Where's the recommended place to put helper methods & etc for examples?
I've started putting them in spec/spec_helper.rb but that's going to get
awfully cluttered. I'm thinking maybe a spec/lib, and add that to
include path? Or just put them in lib? I notice restful_authentication
(I think)
On May 15, 2009, at 4:25 AM, aslak hellesoy wrote:
To be honest, I don't remember what happened to AfterStep. I think we
had it at some point, but can't see it in the codebase. Did I remove
it? Or was that back in the pre-Cucumber days? Help me remember
here...
I'm not sure. I saw a reference
> On May 15, 2009, at 4:25 AM, aslak hellesoy wrote:
>
>> To be honest, I don't remember what happened to AfterStep. I think we
>> had it at some point, but can't see it in the codebase. Did I remove
>> it? Or was that back in the pre-Cucumber days? Help me remember
>> here...
>
> I'm not sure. I s
-Controller --
def update
@user = User.find_by_id( user.id )
if request.post?
unless params[ :user ].nil?
if @user.update_attributes( params[ :user ] )
redirect_to :action => :show
end
else
render :st
Matt Wynne wrote:
On the other hand, if the tests fail for no good reason all the time
because they're fragile, people may stop listening to them, and maybe
eventually stop writing them. The argument I'm making is really just for
slowing down and taking a little more care, with the eventual be
On Fri, May 15, 2009 at 1:02 AM, manoah wrote:
>
> -Controller --
> def update
> �...@user = User.find_by_id( user.id )
This uses user.id, not params[:id]
> if request.post?
>
> unless params[ :user ].nil?
>
> if @user.update_attributes( params[ :user ] )
>
Andrew Premdas wrote:
Seem to be having a problem with the new releases 0.3.5 which
completely breaks my rake tasks http://gist.github.com/112149.
WIth the
t.fork = true # Explicitly fork for cucumber 0.3.4 and rails
lines added to the tasks none of my steps are recognised (see second
file i
I cannot seem to locate any documentation on how to implement the new
table syntax otherwise I would not bother the list with this.
I wish to write something like this:
And we do have a forex rate for the following currency code and date
|code |date| rate |
|"USD"|"200
On Fri, May 15, 2009 at 9:04 AM, Denis Haskin wrote:
> Where's the recommended place to put helper methods & etc for examples?
> I've started putting them in spec/spec_helper.rb but that's going to get
> awfully cluttered. I'm thinking maybe a spec/lib, and add that to include
> path? Or just pu
On Fri, May 15, 2009 at 12:29 PM, Zach Dennis wrote:
> On Fri, May 15, 2009 at 9:04 AM, Denis Haskin
> wrote:
>> Where's the recommended place to put helper methods & etc for examples?
>> I've started putting them in spec/spec_helper.rb but that's going to get
>> awfully cluttered. I'm thinking
I have a new icalendar Ruby library/gem which is implemented so as
require an implementation of the TZInfo::Timezone class, but not to
care whether that implementation comes from the tzinfo gem, or the
activesupport gem in rails. It also will make use of the TimeWithZone
class in recent versions o
On May 15, 2009, at 10:16 AM, aslak hellesoy wrote:
Can you show me the code you would want to put in AfterStep that would
detect a 500 error?
I've written a simple piece of rack middleware (included below) that
will create a file in the event a 500 is raised. I would clear the
file before
I was just about to ask that. Thanks!
dwh
Zach Dennis wrote:
On Fri, May 15, 2009 at 12:29 PM, Zach Dennis wrote:
On Fri, May 15, 2009 at 9:04 AM, Denis Haskin wrote:
Where's the recommended place to put helper methods & etc for examples?
I've started putting them in spec/spec_h
On Fri, May 15, 2009 at 11:35 AM, James Byrne wrote:
> I cannot seem to locate any documentation on how to implement the new
> table syntax otherwise I would not bother the list with this.
>
> I wish to write something like this:
>
> And we do have a forex rate for the following currency code an
Hello all
rSquery aims to reduce the difficulties involved in writing selenium
tests in cucumber environments for webapps that use jQuery.
The project contains several methods to help you with writing
javascript commands for selenium and javascript based tests for
cucumber or even rSpec.
> Andrew Premdas wrote:
>>
>> Seem to be having a problem with the new releases 0.3.5 which
>> completely breaks my rake tasks http://gist.github.com/112149.
>>
>> WIth the
>>
>> t.fork = true # Explicitly fork for cucumber 0.3.4 and rails
>>
>> lines added to the tasks none of my steps are recogn
> I cannot seem to locate any documentation on how to implement the new
> table syntax otherwise I would not bother the list with this.
>
I'm not sure what you mean by "new" table syntax. The syntax for
tables hasn't really changed since it was introduced.
> I wish to write something like this:
>
I do not know if I am doing something wrong or not, but I am seeing
evidence that feature tables in normal scenarios do not actually do
anything.
# feature statement
And we do have a forex rate for "USD" on "2009-03-31" of "0.8666"
| "USD" | "2009-04-01" | "0.8555" |
| "USD" | "
Hi All:
So I have some longer running controller specs that interact with outside API's
that I want to move into an integration directory. In doing so, it seems I
don't get the (possibly determined by directory?) magic that creates a
ControllerExampleGroup, but rather a RailsExampleGroup.
H
Aslak Hellesøy wrote:
> http://wiki.github.com/aslakhellesoy/cucumber/scenario-outlines
>
> Please let us know what's missing or unclear about that.
>
That documentation is for scenario outlines. I had gathered that one
could also simply use tables with regular scenarios where the table
valu
On Fri, May 15, 2009 at 2:15 PM, Forrest Chang wrote:
>
> Hi All:
>
> So I have some longer running controller specs that interact with outside
> API's that I want to move into an integration directory. In doing so, it
> seems I don't get the (possibly determined by directory?) magic that creat
Chris Flipse wrote:
> They're actually unrelated. Most of my table matchers have no other
> regex in the expression
>
> You're not seeing anything else with the table data because you're not
> doing
> anything with the table data.
>
> Given /the following data rates/ do |table|
> table.h
On Fri, May 15, 2009 at 1:15 PM, Forrest Chang wrote:
>
> Hi All:
>
> So I have some longer running controller specs that interact with outside
> API's that I want to move into an integration directory. In doing so, it
> seems I don't get the (possibly determined by directory?) magic that creat
> Hello all
>
> rSquery aims to reduce the difficulties involved in writing selenium tests
> in cucumber environments for webapps that use jQuery.
>
> The project contains several methods to help you with writing javascript
> commands for selenium and javascript based tests for cucumber or even rSp
> Aslak Hellesøy wrote:
>
>> http://wiki.github.com/aslakhellesoy/cucumber/scenario-outlines
>>
>> Please let us know what's missing or unclear about that.
>>
>
> That documentation is for scenario outlines. I had gathered that one
> could also simply use tables with regular scenarios where the ta
> On May 15, 2009, at 10:16 AM, aslak hellesoy wrote:
>
>> Can you show me the code you would want to put in AfterStep that would
>> detect a 500 error?
>
> I've written a simple piece of rack middleware (included below) that will
> create a file in the event a 500 is raised. I would clear the file
> Chris Flipse wrote:
>
>> They're actually unrelated. Most of my table matchers have no other
>> regex in the expression
>>
>> You're not seeing anything else with the table data because you're not
>> doing
>> anything with the table data.
>>
>> Given /the following data rates/ do |table|
>>
Aslak Hellesøy wrote:
>> sure that this is what I was doing, although the table followed a
>> complete scenario. �However, I have not used tables for the last couple
>> of months and am somewhat perplexed with respect to the changes.
>
> What are these changes you are talking about?? The only thin
> Aslak Hellesøy wrote:
>>> sure that this is what I was doing, although the table followed a
>>> complete scenario. �However, I have not used tables for the last couple
>>> of months and am somewhat perplexed with respect to the changes.
>>
>> What are these changes you are talking about?? The onl
On May 15, 2009, at 3:36 PM, aslak hellesoy wrote:
Thanks for doing that. I have one more favour to ask: Can you show me
an example of a StepDefinition that would cause the file to be
created?
That is a tougher question, because any browser interaction that
causes an HTTP request to the app
On May 14, 10:04 am, Julian Leviston wrote:
> On 15/05/2009, at 12:48 AM, aslak hellesoy wrote:
>
> >http://github.com/aslakhellesoy/cucumber/blob/173506c4013a7d733c5b492...
>
> > Enjoy!
I just did an upgrade and came up with .0.3.5. The last entry I see
on you list was .0.3.4 two days ago?
Is
On May 14, 10:04 am, Julian Leviston wrote:
> On 15/05/2009, at 12:48 AM, aslak hellesoy wrote:
>
> >http://github.com/aslakhellesoy/cucumber/blob/173506c4013a7d733c5b492...
>
> > Enjoy!
> > __
Sorry I didn't read to the bottom and see that you also put in the .
0.3.5.
Please excuse
manoah wrote:
>
> -Controller --
> def update
> @user = User.find_by_id( user.id )
> if request.post?
>
> unless params[ :user ].nil?
>
> if @user.update_attributes( params[ :user ] )
> redirect_to :action => :show
>
>
manoah wrote:
>
> -Controller --
> def update
> @user = User.find_by_id( user.id )
> if request.post?
>
> unless params[ :user ].nil?
>
> if @user.update_attributes( params[ :user ] )
> redirect_to :action => :show
>
>
I am new to RSpec and would appreciate some pointers on how to specify the
following for my Rails application...
I have a controller called ContextsController and, within this, the usual
'create' method. The first line of this method should be:
@member = logged_in_member
where logged_in_memb
40 matches
Mail list logo