Re: [rspec-users] Can I construct the controller myself in a controller spec?

2009-03-04 Thread Pat Maddox
On Wed, Mar 4, 2009 at 8:38 PM, Perryn Fowler wrote: > Hi > > I am experimenting with Constructor based dependency injection for > rails controllers. > > So I have something like this > > class LoginSessionsController < ApplicationController > >  def initialize(authenticator =  TheRealAuthenticato

Re: [rspec-users] Can I construct the controller myself in a controller spec?

2009-03-04 Thread David Chelimsky
On Wed, Mar 4, 2009 at 10:38 PM, Perryn Fowler wrote: > Hi > > I am experimenting with Constructor based dependency injection for > rails controllers. > > So I have something like this > > class LoginSessionsController < ApplicationController > >  def initialize(authenticator =  TheRealAuthenticat

[rspec-users] Can I construct the controller myself in a controller spec?

2009-03-04 Thread Perryn Fowler
Hi I am experimenting with Constructor based dependency injection for rails controllers. So I have something like this class LoginSessionsController < ApplicationController def initialize(authenticator = TheRealAuthenticator) @authenticator = authenticator end end The plan was

Re: [rspec-users] ArgumentError mystery with jruby/rspec-1.1.11

2009-03-04 Thread Arthur Smith
We've seen this behavior again, this time with rspec-1.1.12 and jruby 1.2.0RC1; the common factors seem to be: (1) jruby (2) rspec 1.1.11 or 1.1.12 (3) naming a java class with the string 'context' or 'Context' in its name. In this case the bit of ruby causing trouble was: SecurityContex

Re: [rspec-users] OT: AR Default Values

2009-03-04 Thread James Byrne
Scott Taylor wrote: > You could try this plugin: > > http://github.com/aussiegeek/active_record_defaults/tree/master > > Scott Thanks, I will try this out. -- Posted via http://www.ruby-forum.com/. ___ rspec-users mailing list rspec-users@rubyforge.o

Re: [rspec-users] OT: AR Default Values

2009-03-04 Thread Scott Taylor
On Mar 4, 2009, at 12:16 PM, James Byrne wrote: This is sort of off topic but it arose from a cucumber test failure and I am unsure how to address the underlying issue. I spent yesterday tracking down an obscure error that was exposed by a new cucumber test. It turned out to be an improper

Re: [rspec-users] Writing specs for AMQP clients.

2009-03-04 Thread Bira
David and Ben, Thank you very much for your advice :). -- Bira http://compexplicita.wordpress.com http://compexplicita.tumblr.com ___ rspec-users mailing list rspec-users@rubyforge.org http://rubyforge.org/mailman/listinfo/rspec-users

Re: [rspec-users] Testing my scripts?

2009-03-04 Thread Sebastian W.
Hi David, I think I see what you're saying, but I admit I'm still a bit confused. Maybe I'm missing something here, but I can't think of how I would drive the scripts (even through Cucumber) without actually invoking them, thus kicking off processes that I don't want. Real code to illustrate my

Re: [rspec-users] [cucumber] Cucumber and CI

2009-03-04 Thread Yi
Great writing. Thanks On Wed, Mar 4, 2009 at 5:25 AM, Dan North wrote: > 2009/2/24 aslak hellesoy > >> On Tue, Feb 24, 2009 at 10:30 AM, Rob Holland >> wrote: >> > On Tue, Feb 24, 2009 at 9:17 AM, Matt Wynne wrote: >> > >> >> You can even use git commit --amend to commit on red (e.g at the en

Re: [rspec-users] [cucumber] Cucumber and CI

2009-03-04 Thread Matt Wynne
On 4 Mar 2009, at 11:25, Dan North wrote: 2009/2/24 aslak hellesoy On Tue, Feb 24, 2009 at 10:30 AM, Rob Holland wrote: > On Tue, Feb 24, 2009 at 9:17 AM, Matt Wynne wrote: > >> You can even use git commit --amend to commit on red (e.g at the end of the >> day) and then change that c

Re: [rspec-users] [cucumber] Cucumber and CI

2009-03-04 Thread nicholas a. evans
On Wed, Mar 4, 2009 at 6:25 AM, Dan North wrote: > Marking a feature as done can be as simple as moving it between two > directories (called in-progress and done), renaming the feature (from > openid_login.in-progress to openid_login.feature) or having an :in_progress > tag on a feature until it's

[rspec-users] OT: AR Default Values

2009-03-04 Thread James Byrne
This is sort of off topic but it arose from a cucumber test failure and I am unsure how to address the underlying issue. I spent yesterday tracking down an obscure error that was exposed by a new cucumber test. It turned out to be an improper default value assignment made in a controller which in

Re: [rspec-users] Writing specs for AMQP clients.

2009-03-04 Thread Ben Mabey
David Chelimsky wrote: On Wed, Mar 4, 2009 at 4:54 AM, Bira wrote: Hello! I've been lurking in the list a while, and now I would like to ask you a somewhat "noobish" question... This is the first time I've run across this particular problem, so I'm not sure what to do. I'm sure this is so c

Re: [rspec-users] Sinitra 0.9.1 Webrat 0.4.2 Cuc problem

2009-03-04 Thread Andrew Premdas
The app runs fine, its the cucumber tests that don't. If you can point me to your app I'll give it go here. I'm using classic style (just started with Sinatra) 2009/3/4 Rob Holland > My application (the one on which the wiki example is based) still runs > just fine on 0.9.1, so I don't think it

Re: [rspec-users] Sinitra 0.9.1 Webrat 0.4.2 Cuc problem

2009-03-04 Thread Andrew Premdas
Apologies - false alarm - problem was with my step-definition all best Andrew 2009/3/4 Andrew Premdas > The app runs fine, its the cucumber tests that don't. If you can point me > to your app I'll give it go here. > > I'm using classic style (just started with Sinatra) > > 2009/3/4 Rob Hollan

Re: [rspec-users] Sinitra and Cucumber

2009-03-04 Thread Andrew Premdas
Thanks alot - works a treat :) 2009/3/4 Rob Holland > On Wed, Mar 4, 2009 at 4:30 AM, Andrew Premdas wrote: > > With Cuc and Rails I'd be able to debug step definitions by putting > > 'debugger' in the relevant step definition. With Sinatra configured as > above > > this doesn't work. Any tips

Re: [rspec-users] Sinitra 0.9.1 Webrat 0.4.2 Cuc problem

2009-03-04 Thread Pat Nakajima
Rob, Is your Sinatra app using the "classic" style? If so, I think it would work without need for modification. If your app is a class that inherits from Sinatra::Base, you're likely to see issues unless you take the steps in the Gist. Pat On Mar 4, 2009, at 4:43 AM, Rob Holland wrote:

Re: [rspec-users] Writing specs for AMQP clients.

2009-03-04 Thread David Chelimsky
On Wed, Mar 4, 2009 at 4:54 AM, Bira wrote: > Hello! > > I've been lurking in the list a while, and now I would like to ask you > a somewhat "noobish" question... This is the first time I've run > across this particular problem, so I'm not sure what to do. I'm sure > this is so common that's in a

Re: [rspec-users] Testing my scripts?

2009-03-04 Thread David Chelimsky
On Tue, Mar 3, 2009 at 11:35 PM, Sebastian W. wrote: > Hello RSpec mailing list, > I have a question which I'm sure someone here has a "duh!" answer to. :P > > A lot of the Ruby programming I do is around installing servers and > automating various tasks. The pattern I use goes as follows, I'm sur

Re: [rspec-users] [cucumber] Cucumber and CI

2009-03-04 Thread Dan North
2009/2/24 aslak hellesoy > On Tue, Feb 24, 2009 at 10:30 AM, Rob Holland > wrote: > > On Tue, Feb 24, 2009 at 9:17 AM, Matt Wynne wrote: > > > >> You can even use git commit --amend to commit on red (e.g at the end of > the > >> day) and then change that commit later. > > > > While I think comm

[rspec-users] Writing specs for AMQP clients.

2009-03-04 Thread Bira
Hello! I've been lurking in the list a while, and now I would like to ask you a somewhat "noobish" question... This is the first time I've run across this particular problem, so I'm not sure what to do. I'm sure this is so common that's in a textbook somewhere, but what is the best way to write sp

Re: [rspec-users] Cucumber - Performance

2009-03-04 Thread Thibaut Barrère
> My guess is that it's the initial start-up that's slow. This is a great > reason to use something like autotest, which will keep the process loaded > up. I wonder how that hell you could make that work with C# code though! > Watch the DLLs?! coming late on this one - if this is useful to someone

Re: [rspec-users] Sinitra 0.9.1 Webrat 0.4.2 Cuc problem

2009-03-04 Thread Rob Holland
My application (the one on which the wiki example is based) still runs just fine on 0.9.1, so I don't think it's related to the version change. I think the hacks Pat used are solely to do with getting selenium mode happy. ___ rspec-users mailing list rsp

Re: [rspec-users] Sinitra and Cucumber

2009-03-04 Thread Rob Holland
On Wed, Mar 4, 2009 at 4:30 AM, Andrew Premdas wrote: > With Cuc and Rails I'd be able to debug step definitions by putting > 'debugger' in the relevant step definition. With Sinatra configured as above > this doesn't work. Any tips on making this work and/or explaining whats > different/ Just us