Re: [rspec-users] custom, nested HTML matchers in RSpec

2009-03-15 Thread Phlip
Pat Maddox wrote: I dunno. Zach's original attempt hardly "sucks". That was David Chelimsky's attempt - Zach seconded it. But I was replying to myself. More important, the tie-breaker here is very simple: When the assertion fails, can it tell you exactly how to fix things? That me

Re: [rspec-users] How to use different mocking frameworks?

2009-03-15 Thread Scott Taylor
Val wrote: Okay. Thanks for your responses. I guess I'll try splitting them into separate directories. Will each directory automatically include it's own spec_helper.rb? Are you using any features from one mock framework that aren't present in the other? If not, potentially you could, wit

[rspec-users] An Update for my "Fan"

2009-03-15 Thread Rick DeNatale
On the assumption that someone here might actually occasionally read my blog often enough to notice. It's been down since sometime last Wednesday. I've been aware of it since Wednesday night, and I've been working on bringing it back. If you're not interested, move along, these aren't the droids

Re: [rspec-users] How to use different mocking frameworks?

2009-03-15 Thread David Chelimsky
On Sun, Mar 15, 2009 at 1:51 PM, Val wrote: > Okay.  Thanks for your responses. > > I guess I'll try splitting them into separate directories.  Will each > directory automatically include it's own spec_helper.rb? Not sure I understand that question. You're going to be manually splitting things up

Re: [rspec-users] How to use different mocking frameworks?

2009-03-15 Thread Val
Okay. Thanks for your responses. I guess I'll try splitting them into separate directories. Will each directory automatically include it's own spec_helper.rb? On Mar 15, 6:09 am, David Chelimsky wrote: > On Sun, Mar 15, 2009 at 7:38 AM, Andrew Premdas wrote: > > Would it be possible to split

Re: [rspec-users] Cucumber - Adding a step definition

2009-03-15 Thread John Goodsen
It's SRP applied to cucumber steps - just do it - keep your steps small and composable Sent from my iPhone On Mar 14, 2009, at 9:18 PM, Matt Wynne wrote: On 15 Mar 2009, at 00:30, Josh Chisholm wrote: That sounds like a great way to avoid the instance variable. Why is a named record pr

Re: [rspec-users] custom, nested HTML matchers in RSpec

2009-03-15 Thread Pat Maddox
On Mar 15, 2009, at 10:33 AM, Zach Dennis wrote: On Sun, Mar 15, 2009 at 1:05 PM, Phlip wrote: response.body.should be_html_with{ form :action => '/users' do fieldset do legend 'Personal Information' label 'First name' input :type => 'text', :name => 'user[

[rspec-users] [ANN] rspec-rails 1.2.0 Released

2009-03-15 Thread David Chelimsky
rspec-rails version 1.2.0 has been released! * * * * Behaviour Driven Development for Ruby on Rails. Changes: ### Version 1.2.0 IMPO

[rspec-users] [ANN] rspec 1.2.0 Released

2009-03-15 Thread David Chelimsky
rspec version 1.2.0 has been released! Behaviour Driven Development for Ruby. Changes: ### Version 1.2.0 WARNINGS: * If you use the ruby command to run specs instead of the spec command, you'll need to require 'spec/autorun' or they won't run. This won't affect you if you use the spe

Re: [rspec-users] Cucumber - Adding a step definition

2009-03-15 Thread Matt Wynne
On 15 Mar 2009, at 16:52, Ben Mabey wrote: I know what you mean, and it would certainly make for nice readable scenarios. My worry is how maintainable the steps would be in the long run. I'm used to seeing steps like this: Given /the Policy has a secondary risk/ do Policy.count.should =

Re: [rspec-users] custom, nested HTML matchers in RSpec

2009-03-15 Thread Phlip
Zach Dennis wrote: I didn't have the expectation that they were peers of each other, just that they both existed somewhere in a fieldset tag. Any helper or matchers used for spec'ing views should be as liberal as possible while still communicating enough about the semantics of the page for the e

Re: [rspec-users] custom, nested HTML matchers in RSpec

2009-03-15 Thread Zach Dennis
On Sun, Mar 15, 2009 at 1:05 PM, Phlip wrote: >>>   response.body.should be_html_with{ >>>     form :action => '/users' do >>>       fieldset do >>>         legend 'Personal Information' >>>         label 'First name' >>>         input :type => 'text', :name => 'user[first_name]' >>>       end >>>

[rspec-users] evgeny.zislis has invited you to Spokeo

2009-03-15 Thread evgeny . zislis
Hi rspec-users, evgeny.zis...@gmail.com has invited you to try Spokeo, which finds your friends' updates across the Web. Your friends are already using Spokeo to follow you on Web Results. Try Spokeo today to find what your friends are doing across 30 different social networks! Click http://w

Re: [rspec-users] custom, nested HTML matchers in RSpec

2009-03-15 Thread Phlip
response.body.should be_html_with{ form :action => '/users' do fieldset do legend 'Personal Information' label 'First name' input :type => 'text', :name => 'user[first_name]' end end } Has anyone tried this? is it useful? That assertion

Re: [rspec-users] Cucumber - Adding a step definition

2009-03-15 Thread Ben Mabey
I know what you mean, and it would certainly make for nice readable scenarios. My worry is how maintainable the steps would be in the long run. I'm used to seeing steps like this: Given /the Policy has a secondary risk/ do Policy.count.should == 1 policy = Policy.first policy.secondary_

Re: [rspec-users] Rspec and EventMachine

2009-03-15 Thread Steven Baker
I am trying to create a app that makes use of EventMachine. As I recently fell in love with Rspec, I was trying to use it with our EM. However, I have no idea how to do this. Also, I want to remove network connections from the tests (as I might not be connected when running them), so I think I sho

Re: [rspec-users] How to use different mocking frameworks?

2009-03-15 Thread David Chelimsky
On Sun, Mar 15, 2009 at 7:38 AM, Andrew Premdas wrote: > Would it be possible to split the tests into separate runs - a bit like > having two different run configurations with cucumber? If you split the specs w/ rspec-mocks and those w/ mocha in separate dirs, you could run them each manually. Or

Re: [rspec-users] How to use different mocking frameworks?

2009-03-15 Thread Andrew Premdas
Would it be possible to split the tests into separate runs - a bit like having two different run configurations with cucumber? 2009/3/15 David Chelimsky > On Sun, Mar 15, 2009 at 12:01 AM, David Chelimsky > wrote: > > On Sat, Mar 14, 2009 at 8:37 PM, Val wrote: > >> Hi, > >> > >> I'm pretty ne

Re: [rspec-users] Cucumber - Adding a step definition

2009-03-15 Thread Josh Chisholm
I like that heuristic Matt. Actually coupling via the database is quite different to instance variables. The database state would exist if you followed through the scenario without cucumber e.g. manually. It occurred to me you could avoid the table like this too: Given a policy with a PCF practi