Re: [rspec-users] Testing for the number of occurrences of a word

2009-03-10 Thread Bart Zonneveld
On 10 mrt 2009, at 16:37, Bart Zonneveld wrote: On 10 mrt 2009, at 14:05, aslak hellesoy wrote: On Tue, Mar 10, 2009 at 1:16 PM, Bart Zonneveld > wrote: Hey list, Quick question: How can I check that a given word appears a number of times on a page? The page in question includes some XML,

Re: [rspec-users] Cucumber - RSpec matcher

2009-03-10 Thread James Byrne
Aslak Hellesøy wrote: > On Mon, Mar 9, 2009 at 8:48 PM, James Byrne > wrote: > >> > David >> >> Perhaps it is my dialect, but what is wrong with: >> >> "5 should be equal to 5" >> >> which generally is how I read "=="? Actually, I tend to read "==" (in >> Ruby) as "is equal to". > > > RSpec

Re: [rspec-users] Testing for the number of occurrences of a word

2009-03-10 Thread Bart Zonneveld
On 10 mrt 2009, at 14:05, aslak hellesoy wrote: On Tue, Mar 10, 2009 at 1:16 PM, Bart Zonneveld > wrote: Hey list, Quick question: How can I check that a given word appears a number of times on a page? The page in question includes some XML, rendered with s and I want to test th

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

It seems this is actually related to the java package name containing 'context'. I've posted a rspec bug for this along with a simple case to demonstrate. I realize this may wind up kicked over to the JRuby people... http://rspec.lighthouseapp.com/projects/5645-rspec/tickets/728-rspecjruby-

Re: [rspec-users] nokogiri selector help

> Sorry for the late reply, but this is a bug in webrat not a nokogiri > issue. I've created a ticket for it at lighthouse: > > http://webrat.lighthouseapp.com/projects/10503-webrat/tickets/153-within-should-support-xpath I wrote an ugly duckpunch that fixes the error for now. I have submitted

Re: [rspec-users] Testing for the number of occurrences of a word

On Tue, Mar 10, 2009 at 1:16 PM, Bart Zonneveld wrote: > Hey list, > > Quick question: How can I check that a given word appears a number of times > on a page? > The page in question includes some XML, rendered with s and I > want to test that a given node exists 10 times on that page. >

Re: [rspec-users] Question on SQL exceptions

James Byrne wrote: > > I do not know what I am doing wrong either. I tried much the same thing > as you suggest last night in the console: Well, whatever I was doing wrong I seem to have fixed it. Things now seem to be working as I intended. -- Posted via http://www.ruby-forum.com/. ___

Re: [rspec-users] Question on SQL exceptions

Pat Maddox wrote: > > Not sure what your problem is. Here's a gist that demonstrates what > you're trying to do, and works fine. http://gist.github.com/76667 > > Pat I do not know what I am doing wrong either. I tried much the same thing as you suggest last night in the console: >> def my_

[rspec-users] stubbing before filters

Can folks who write controller specs and deal with before filters read and comment on this ticket: http://rspec.lighthouseapp.com/projects/5645-rspec/tickets/724-stub_before_filters#ticket-724-2 I'm on the fence and would like others thoughts on the matter, Thanks -- Zach Dennis http://www.conti

Re: [rspec-users] Testing for the number of occurrences of a word

On Tue, Mar 10, 2009 at 8:16 AM, Bart Zonneveld wrote: > Hey list, > > Quick question: How can I check that a given word appears a number of times > on a page? > The page in question includes some XML, rendered with s and I > want to test that a given node exists 10 times on that page. Yo

Re: [rspec-users] rspec and prawn

On Tue, Mar 10, 2009 at 8:43 AM, Zach Dennis wrote: > On Mon, Mar 9, 2009 at 11:02 PM, aa aa wrote: >> Hi, >> I've just started using prawn but am at a bit of a loss how to create my >> view specs for it. >> For example, my normal view spec has things like >> response.should have_tag("blah") >> o

Re: [rspec-users] rspec and prawn

aa aa wrote: Hi, I've just started using prawn but am at a bit of a loss how to create my view specs for it. For example, my normal view spec has things like response.should have_tag("blah") or response.body.should =~ /something/ How do I do this with prawn output? How do prawn's own unit test

[rspec-users] Testing for the number of occurrences of a word

Hey list, Quick question: How can I check that a given word appears a number of times on a page? The page in question includes some XML, rendered with s and I want to test that a given node exists 10 times on that page. thanks! bartz ___ r

Re: [rspec-users] rspec and prawn

On Mon, Mar 9, 2009 at 11:02 PM, aa aa wrote: > Hi, > I've just started using prawn but am at a bit of a loss how to create my > view specs for it. > For example, my normal view spec has things like > response.should have_tag("blah") > or > response.body.should =~ /something/ > > How do I do this

Re: [rspec-users] rspec and prawn

aa aa wrote: Hi, I've just started using prawn but am at a bit of a loss how to create my view specs for it. For example, my normal view spec has things like response.should have_tag("blah") or response.body.should =~ /something/ How do I do this with prawn output? In what language is prawn ou