Re: [rspec-users] mock_model named spaces not working

2007-09-28 Thread Luis Lavena
On 9/29/07, Andrew WC Brown <[EMAIL PROTECTED]> wrote: > I have a namespace called saltmines > > The following will fail the spec > > @player = mock_model(Saltmines::Player) > > 1) > ActionView::TemplateError in '/saltmines/players/index.rhtml should render > list of saltmines/players' > You have a

[rspec-users] mock_model named spaces not working

2007-09-28 Thread Andrew WC Brown
I have a namespace called saltmines The following will fail the spec @player = mock_model(Saltmines::Player) 1) ActionView::TemplateError in '/saltmines/players/index.rhtml should render list of saltmines/players' You have a nil object when you didn't expect it! You might have expected an instan

Re: [rspec-users] How do I best setup data for Story Runner?

2007-09-28 Thread Jonathan Linowes
yes, i appreciate all the smartness built into it. I wonder if this idea could be extended to generate mocks, eg for my controller specs user = mock_user( :email => "[EMAIL PROTECTED]" ) etc not sure how far you could go with this, eg stubbing basic stuff like .find Just a thought On Sep

Re: [rspec-users] form action url example

2007-09-28 Thread David Chelimsky
On 9/28/07, sinclair bain <[EMAIL PROTECTED]> wrote: > Hi, > > I have the following example: > > > it 'should have a form with an action attribute' do > response.should have_tag( "form[action=?]", > '/users/1/machines/1/trouble_tickets') > end > for a form like so: > > > <% form_for( :trou

Re: [rspec-users] How do I best setup data for Story Runner?

2007-09-28 Thread Scott Taylor
On Sep 28, 2007, at 1:20 PM, Jonathan Linowes wrote: > Scott, > Thanks for the plug-in, http://thmadb.com/public_svn/plugins/ > fixture_replacement > I've started using it, replacing my ad hoc factory methods > And I like the idea of putting the factory in db/ Thanks for trying it out. I'd love

Re: [rspec-users] How do I best setup data for Story Runner?

2007-09-28 Thread Zach Dennis
On 9/27/07, Carl Porth <[EMAIL PROTECTED]> wrote: > > +1 > > I've adopted a factory pattern for organizing my tests inspired by: > http://www.dcmanges.com/blog/38 > +1 We have also started doing this. It is freakishly amazing and maintainable thus far over the course of our app changing,

Re: [rspec-users] 1.0.8 tarball problem.

2007-09-28 Thread barsalou
Scott said: This was a known problem. I believe it should be fixed in the next release (fixed on trunk). Scott, Would that mean I have to use svn? I don't have that option at the moment. Thanks for letting me know, though. Mike B. -

Re: [rspec-users] How do I best setup data for Story Runner?

2007-09-28 Thread Jonathan Linowes
Scott, Thanks for the plug-in, http://thmadb.com/public_svn/plugins/ fixture_replacement I've started using it, replacing my ad hoc factory methods And I like the idea of putting the factory in db/ btw, for the record, while the Dan Manges blog was posted Aug 07, the first time I saw this techn

[rspec-users] form action url example

2007-09-28 Thread sinclair bain
Hi, I have the following example: it 'should have a form with an action attribute' do response.should have_tag( "form[action=?]", '/users/1/machines/1/trouble_tickets') end for a form like so: <% form_for( :trouble_ticket, :url => { :action => 'create', :user_id => @

Re: [rspec-users] There is a easy way to valid markup?

2007-09-28 Thread Wincent Colaiuta
El 27/9/2007, a las 22:23, Pat Maddox escribió: > I'm sure you could hook into some kind of validator. I jumped on > RubyForge and found http://rubyforge.org/projects/feedvalidator/. It > kind of sucks because you'd depend on a web service for this...there > have to be validators that you can ru

Re: [rspec-users] Testing emails with RSpec 1.0.8.

2007-09-28 Thread Shane Mingins
On 28/09/2007, at 9:01 PM, Ladislav Martincik wrote: > Anyone is doing email testing with RSpec? > Can you post some examples? > Like this? before(:each) do @user1 = mock_model(UserAccount, :email => '[EMAIL PROTECTED]') @user2 = mock_model(UserAccount, :email => '[EMAIL PROTECTED]

[rspec-users] Testing emails with RSpec 1.0.8.

2007-09-28 Thread Ladislav Martincik
Anyone is doing email testing with RSpec? Can you post some examples? Thank you, Laco M. ___ rspec-users mailing list rspec-users@rubyforge.org http://rubyforge.org/mailman/listinfo/rspec-users

Re: [rspec-users] How do I best setup data for Story Runner?

2007-09-28 Thread Pat Maddox
On 9/28/07, Scott Taylor <[EMAIL PROTECTED]> wrote: > > On Sep 27, 2007, at 6:11 PM, Carl Porth wrote: > > > On Sep 27, 2007, at 12:41 PM, Pat Maddox wrote: > > > >> On 9/26/07, Simon Peter Nicholls <[EMAIL PROTECTED]> wrote: > >>> Just started looking at the Story Runner integration, and am > >>>

Re: [rspec-users] How do I best setup data for Story Runner?

2007-09-28 Thread Scott Taylor
On Sep 27, 2007, at 6:11 PM, Carl Porth wrote: > On Sep 27, 2007, at 12:41 PM, Pat Maddox wrote: > >> On 9/26/07, Simon Peter Nicholls <[EMAIL PROTECTED]> wrote: >>> Just started looking at the Story Runner integration, and am >>> converting a few Rails integration tests to get a feel for it. >>>