Re: [rspec-users] redirects while using subdomains not working in 4.1

2009-02-05 Thread Zach Dennis
On Thu, Feb 5, 2009 at 2:13 PM, Tom Hoen wrote: > With the great help of David C., Scott T., and Dennis Z., redirecting > while using a sub-domain worked in Dennis' fork: > git://github.com/zdennis/webrat.git. > > Unfortunately, after upgrading to 4.1 (so I could use set_hidden_field), > I am gett

Re: [rspec-users] [OT] Object Mother vs Test Data Builder (was Jay Fields' blog on developer testing)

2009-02-05 Thread Pat Maddox
On Thu, Feb 5, 2009 at 8:17 AM, Ben Mabey wrote: > Any thoughts? Are Ruby's Object Mothers really Test Data Builders? Here's what I think is important: * Make fixture setup explicit by inlining it on a per example/group basis * Keep fixture setup short by hiding the object graph construction *

[rspec-users] [Cucumber] Progress Bar

2009-02-05 Thread Matt Wynne
Inspired by Nick Evans' RSpec progress bar[1], I had a little crack at implementing the progress bar for cucumber, 'cause I want to know how long a break I can take while the features are running :) It's in my fork, in the coverage_formatter branch: http://github.com/mattwynne/cucumber/tree/m

Re: [rspec-users] redirects while using subdomains not working in 4.1

2009-02-05 Thread Josh Knowles
On Thu, Feb 5, 2009 at 2:13 PM, Tom Hoen wrote: > Did not all of Dennis's changes make it in? As far as I know I merged everything in. Please feel free to open up a ticket in lighthouse, and/or startup a thread on the Webrat mailing list with a specific example of whats going wrong and we'll get

[rspec-users] Bizarre problem with Rake / Rcov

2009-02-05 Thread James Byrne
I am writing a custom rake task for rcov. The intent is top produce three variants of a test, each using slightly different options. This is the basic code: R_RCOV_AGGREG_FILE= 'coverage.data' # Use single quotes here so that regexp argument is not munged. R_RCOV_EXCLUDE_DIR= 'lib

Re: [rspec-users] Can cucumber/webrat set a value on a hidden field

2009-02-05 Thread Tom Hoen
Bart Zonneveld wrote: > Using version 0.4.1, I can succesfully set hidden field using > set_hidden_field. > Bart - Thanks for the heads up that 4.1 was released and contained the set_hidden_field method. I have updated my webrat plugin to 4.1, but unfortunately, sub-domain redirects seem to b

Re: [rspec-users] [OT] Object Mother vs Test Data Builder (was Jay Fields' blog on developer testing)

2009-02-05 Thread Scott Taylor
Nat points out that problems with Object Mother arise when people start adding factory methods to deal with the edge cases, such as ObjectMother.new_invoice_with_no_postal_code. I totally agree that this would be a problem since such abstraction results in hard to follow tests (this is w

[rspec-users] redirects while using subdomains not working in 4.1

2009-02-05 Thread Tom Hoen
With the great help of David C., Scott T., and Dennis Z., redirecting while using a sub-domain worked in Dennis' fork: git://github.com/zdennis/webrat.git. Unfortunately, after upgrading to 4.1 (so I could use set_hidden_field), I am getting responses of "You are being redirected" instead of getti

Re: [rspec-users] [OT] Object Mother vs Test Data Builder (was Jay Fields' blog on developer testing)

2009-02-05 Thread Matt Wynne
On 5 Feb 2009, at 16:55, David Chelimsky wrote: We also have a naming conflict in terms of test categories. The definitions as I understand them are: * Unit tests test units - generally one object at a time, or perhaps more than one object that live within a single component, but never crossi

Re: [rspec-users] [OT] Jay Fields' blog on developer testing

2009-02-05 Thread Mark Wilden
On Thu, Feb 5, 2009 at 8:17 AM, Ben Mabey wrote: > David Chelimsky wrote: > >> I highly recommend this blog post by Jay Fields: >> http://blog.jayfields.com/2009/02/thoughts-on-developer-testing.html >> > It sounded to me like another of those "xxx is not a panacea" articles, and that "you should

Re: [rspec-users] [rspec] [rails] Specing a form builder

2009-02-05 Thread Chris Flipse
got it. The normal FormBuilder class uses template as a pass through for the basic form fields. before do helper = Object.new.extend ActionView::Helpers::FormHelper @object = mock_model(Foo) @builder = RandomFormBuilder(:foo, @object, helper, {}, nil) end then all works beautifully. On Th

Re: [rspec-users] [OT] Object Mother vs Test Data Builder (was Jay Fields' blog on developer testing)

2009-02-05 Thread David Chelimsky
On Thu, Feb 5, 2009 at 10:17 AM, Ben Mabey wrote: > David Chelimsky wrote: >> >> I highly recommend this blog post by Jay Fields: >> http://blog.jayfields.com/2009/02/thoughts-on-developer-testing.html >> >> Cheers, >> David >> ___ >> rspec-users mailing

Re: [rspec-users] [OT] Object Mother vs Test Data Builder (was Jay Fields' blog on developer testing)

2009-02-05 Thread Ben Mabey
David Chelimsky wrote: I highly recommend this blog post by Jay Fields: http://blog.jayfields.com/2009/02/thoughts-on-developer-testing.html Cheers, David ___ rspec-users mailing list rspec-users@rubyforge.org http://rubyforge.org/mailman/listinfo/rspe

[rspec-users] [rspec] [rails] Specing a form builder

2009-02-05 Thread Chris Flipse
I'm trying to set up and run a new form builder under rails, which lives under the helpers directory, but isn't really a helper. (Not a module, so doesn't mix in well) Short of dropping down into a view spec, how do I set up to actually spec the form builder? describe RandomFormBuilder do attr

Re: [rspec-users] Can cucumber/webrat set a value on a hidden field

2009-02-05 Thread Bart Zonneveld
On 4-feb-2009, at 19:49, Tom Hoen wrote: According to this documentation (http://gitrdoc.com/brynary/webrat/tree/master/classes/Webrat/ Scope.html) there should be a set_hidden_field method. But the method no longer appears to be in the webrat/core/scope.rb file Probably because it didn't a

Re: [rspec-users] MyModel.stub!l works in 1.1.11 but fails in 1.1.12

2009-02-05 Thread Brad
On Feb 4, 10:22 pm, David Chelimsky wrote: > On Wed, Feb 4, 2009 at 7:42 PM, Brad wrote: > > I have a controller spec that works find with Rails 2.2.2 and Rspec- > > Rails 1.1.11.  The code is: > > > �...@activity=mock_model(Activity, :id => 7) > >  Activity.stub!(:get).with("7").and_return(@ac

Re: [rspec-users] [OT] Jay Fields' blog on developer testing

2009-02-05 Thread Matt Wynne
I like this line: Today's testing patterns are like beta software. The patterns have been tested internally, but are rarely proven in the wild. As such, the patterns will sometimes work given the right context, and other times they will shit the bed. So true, so hard to explain, so well p

Re: [rspec-users] [Cucumber, Webrat] Error backtraces shown as HTML in console

2009-02-05 Thread Matt Wynne
On 5 Feb 2009, at 11:00, aslak hellesoy wrote: On Thu, Feb 5, 2009 at 10:38 AM, Matt Wynne wrote: Since upgrading to Cucumber 0.1.99.19 I've noticed that the backtraces appearing in the console output are of the form: Page load was not successful (Code: 500): Followed by the dump of th

Re: [rspec-users] [Cucumber, Webrat] Error backtraces shown as HTML in console

2009-02-05 Thread aslak hellesoy
On Thu, Feb 5, 2009 at 10:38 AM, Matt Wynne wrote: > Since upgrading to Cucumber 0.1.99.19 I've noticed that the backtraces > appearing in the console output are of the form: > >Page load was not successful (Code: 500): > > Followed by the dump of the rails error page. That page looks fine in

Re: [rspec-users] Cucumber/Webrat fails to find fields when run after specs

2009-02-05 Thread Christopher Bailey
Data before is nothing. I'm not sure why there's data after. I would clear the data before running Cucumber, but after running specs by doing a "rake db:reset" or similar, but it has no effect, because that's the same task that started off the whole thing. I'm running this under CruiseControl and

[rspec-users] [Cucumber, Webrat] Error backtraces shown as HTML in console

2009-02-05 Thread Matt Wynne
Since upgrading to Cucumber 0.1.99.19 I've noticed that the backtraces appearing in the console output are of the form: Page load was not successful (Code: 500): Followed by the dump of the rails error page. That page looks fine in a browser, and it's helpful enough to see it when save_a

Re: [rspec-users] Cucumber/Webrat fails to find fields when run after specs

2009-02-05 Thread aslak hellesoy
On Thu, Feb 5, 2009 at 1:43 AM, Christopher Bailey wrote: > On Wed, Feb 4, 2009 at 12:54 PM, aslak hellesoy > wrote: >> >> On Wed, Feb 4, 2009 at 7:21 PM, Christopher Bailey >> wrote: >> > I've been battling the strangest behavior, and hoping someone can shed >> > some >> > light... >> > I am us

Re: [rspec-users] [Rspec] How do you nest before(:all) or after(:all) blocks?

2009-02-05 Thread John Kolokotronis
> Have you considered using Cucumber rather than RSpec as the driver to   > run these tests? TBH, I haven't really looked at Cucumber much, as I'm just getting started with Rspec itself. My impression though was that Cucumber replaced the story runner and the way my tests are structured just seem

Re: [rspec-users] Cucumber/Webrat fails to find fields when run after specs

2009-02-05 Thread Christopher Bailey
I don't use fixtures or have any anywhere. On Wed, Feb 4, 2009 at 11:32 PM, Mark Wilden wrote: > On Wed, Feb 4, 2009 at 11:08 PM, Christopher Bailey > wrote: > >> >> My primary residual concern is that the DB isn't clean after the specs >> run, which means it's not clean for the features/Cucumb