Re: [rspec-users] Cucumber ".should contain(expected) does but fails anyway

2009-04-24 Thread James Byrne
James Byrne wrote: > > Patch is on Lighthouse. > > https://rspec.lighthouseapp.com/projects/5645-rspec/tickets/804 > Besides Fixnum, are there any other Ruby Class Objects that do not have a virtual class? -- Posted via http://www.ruby-forum.com/. ___

Re: [rspec-users] Cucumber ".should contain(expected) does but fails anyway

2009-04-24 Thread Pat Maddox
On Wed, Apr 22, 2009 at 12:18 PM, David Chelimsky wrote: > On Wed, Apr 22, 2009 at 2:09 PM, James Byrne wrote: >> David Chelimsky wrote: >>> On Wed, Apr 22, 2009 at 1:45 PM, James Byrne >>> wrote: this worked: I am not throwing out RSpec or using it any less. �I just had to get �

Re: [rspec-users] Cucumber ".should contain(expected) does but fails anyway

2009-04-24 Thread James Byrne
David Chelimsky wrote: > BTW - FWIW, this is a classic example of how OSS should work. User > gets frustrated. User solves problem through contribution. Thanks for > playing! Patch is on Lighthouse. https://rspec.lighthouseapp.com/projects/5645-rspec/tickets/804 I did this on my laptop so some

Re: [rspec-users] Cucumber ".should contain(expected) does but fails anyway

2009-04-23 Thread James Byrne
David Chelimsky wrote: > On Thu, Apr 23, 2009 at 3:16 PM, James Byrne > wrote: >> to stick the object_handle method in the right place and get the revised >> specs to pass. �I should have a patch for you tomorrow. If not, then by >> Monday. > > Cool. I may need to get a release out before t

Re: [rspec-users] Cucumber ".should contain(expected) does but fails anyway

2009-04-23 Thread James Byrne
David Chelimsky wrote: > On Wed, Apr 22, 2009 at 2:09 PM, James Byrne > wrote: � � � (Spec::Expectations::ExpectationNotMetError) >> Rates" >> WDYT? > I like the idea, though I think it's helpful to also have the strings > in the case of String objects. But having the class and object id > w

Re: [rspec-users] Cucumber ".should contain(expected) does but fails anyway

2009-04-23 Thread David Chelimsky
On Thu, Apr 23, 2009 at 3:17 PM, David Chelimsky wrote: > On Thu, Apr 23, 2009 at 3:16 PM, James Byrne wrote: >> David Chelimsky wrote: >>> On Thu, Apr 23, 2009 at 2:26 PM, James Byrne >>> wrote: David Chelimsky wrote: > I'd rather always define our own so the results are consisten

Re: [rspec-users] Cucumber ".should contain(expected) does but fails anyway

2009-04-23 Thread David Chelimsky
On Thu, Apr 23, 2009 at 3:16 PM, James Byrne wrote: > David Chelimsky wrote: >> On Thu, Apr 23, 2009 at 2:26 PM, James Byrne >> wrote: >>> David Chelimsky wrote: >>> I'd rather always define our own so the results are consistent from RSpec regardless of other frameworks in the midst. Do

Re: [rspec-users] Cucumber ".should contain(expected) does but fails anyway

2009-04-23 Thread James Byrne
David Chelimsky wrote: > On Thu, Apr 23, 2009 at 2:26 PM, James Byrne > wrote: >> David Chelimsky wrote: >> >>> I'd rather always define our own so the results are consistent from >>> RSpec regardless of other frameworks in the midst. Does that make >>> sense to you? >> >> Instead of metaclass ho

Re: [rspec-users] Cucumber ".should contain(expected) does but fails anyway

2009-04-23 Thread David Chelimsky
On Thu, Apr 23, 2009 at 2:26 PM, James Byrne wrote: > David Chelimsky wrote: > >> I'd rather always define our own so the results are consistent from >> RSpec regardless of other frameworks in the midst. Does that make >> sense to you? > > Instead of metaclass how about object_handle ? > > wdt? G

Re: [rspec-users] Cucumber ".should contain(expected) does but fails anyway

2009-04-23 Thread James Byrne
David Chelimsky wrote: > I'd rather always define our own so the results are consistent from > RSpec regardless of other frameworks in the midst. Does that make > sense to you? Instead of metaclass how about object_handle ? wdt? -- Posted via http://www.ruby-forum.com/.

Re: [rspec-users] Cucumber ".should contain(expected) does but fails anyway

2009-04-23 Thread James Byrne
David Chelimsky wrote: > On Thu, Apr 23, 2009 at 1:56 PM, James Byrne > wrote: >> for that method before extending Object with my own. If >> Object.respond_to? :metaclass == true then we are in Rails, or some >> other framework that provides the same thing, and so we need not provide >> our own.

Re: [rspec-users] Cucumber ".should contain(expected) does but fails anyway

2009-04-23 Thread David Chelimsky
On Thu, Apr 23, 2009 at 1:56 PM, James Byrne wrote: > David Chelimsky wrote: >> >> >> I don't think we should call it metaclass though, but I'm not sure >> what I *do* want to call it. Metaclass != eigenclass, which is what >> this really is, so maybe eigenclass.rb - don't let that hang you up >>

Re: [rspec-users] Cucumber ".should contain(expected) does but fails anyway

2009-04-23 Thread James Byrne
David Chelimsky wrote: > > > I don't think we should call it metaclass though, but I'm not sure > what I *do* want to call it. Metaclass != eigenclass, which is what > this really is, so maybe eigenclass.rb - don't let that hang you up > though, I can always change the names after. > The thing i

Re: [rspec-users] Cucumber ".should contain(expected) does but fails anyway

2009-04-23 Thread David Chelimsky
On Thu, Apr 23, 2009 at 11:08 AM, James Byrne wrote: > Another question: Where should metaclass.rb go; lib? lib/spec? or should > the method be put inside the spec_helper file? This is a utility for matchers to give good messages, so I'd put it in lib/spec/matchers I don't think we should call i

Re: [rspec-users] Cucumber ".should contain(expected) does but fails anyway

2009-04-23 Thread James Byrne
Another question: Where should metaclass.rb go; lib? lib/spec? or should the method be put inside the spec_helper file? -- Posted via http://www.ruby-forum.com/. ___ rspec-users mailing list rspec-users@rubyforge.org http://rubyforge.org/mailman/listinf

Re: [rspec-users] Cucumber ".should contain(expected) does but fails anyway

2009-04-22 Thread John Goodsen
+1. I like it. -- John Goodsen RADSoft / Better Software Faster jgood...@radsoft.comLean/Agile/XP/Scrum Coaching and Training http://www.radsoft.com Ruby on Rails and Java Solutions On Wed, Apr 22, 2009 at 4:22 PM, James Byrne wrote: > David Chelimsky wrot

Re: [rspec-users] Cucumber ".should contain(expected) does but fails anyway

2009-04-22 Thread James Byrne
David Chelimsky wrote: > On Wed, Apr 22, 2009 at 2:09 PM, James Byrne > wrote: � � � (Spec::Expectations::ExpectationNotMetError) >> Rates" >> WDYT? > I like the idea, though I think it's helpful to also have the strings > in the case of String objects. But having the class and object id > w

Re: [rspec-users] Cucumber ".should contain(expected) does but fails anyway

2009-04-22 Thread James Byrne
David Chelimsky wrote: > I like the idea, though I think it's helpful to also have the strings > in the case of String objects. But having the class and object id > would really help tell the story we're looking for. The relationship between "#>" and the object's id is rather bizarre. irb(main)

Re: [rspec-users] Cucumber ".should contain(expected) does but fails anyway

2009-04-22 Thread David Chelimsky
On Wed, Apr 22, 2009 at 2:09 PM, James Byrne wrote: > David Chelimsky wrote: >> On Wed, Apr 22, 2009 at 1:45 PM, James Byrne >> wrote: >>> this worked: >>> I am not throwing out RSpec or using it any less. �I just had to get >>> � � � � � � got "Bank of Canada: Noon Foreign Exchange >>> Rates" >>

Re: [rspec-users] Cucumber ".should contain(expected) does but fails anyway

2009-04-22 Thread James Byrne
David Chelimsky wrote: > On Wed, Apr 22, 2009 at 1:45 PM, James Byrne > wrote: >> this worked: >> I am not throwing out RSpec or using it any less. �I just had to get >> � � � � � � got "Bank of Canada: Noon Foreign Exchange >> Rates" >> >> � � �(equal?: expected object is not the object returned

Re: [rspec-users] Cucumber ".should contain(expected) does but fails anyway

2009-04-22 Thread David Chelimsky
On Wed, Apr 22, 2009 at 1:45 PM, James Byrne wrote: > David Chelimsky wrote: >> >> >> The original issue you posted is with the contain matcher, which is in >> webrat, not rspec. Why it's not working, I'm not quite sure, but if >> you're going to throw out the baby with the bath water, you might >

Re: [rspec-users] Cucumber ".should contain(expected) does but fails anyway

2009-04-22 Thread James Byrne
David Chelimsky wrote: > > > The original issue you posted is with the contain matcher, which is in > webrat, not rspec. Why it's not working, I'm not quite sure, but if > you're going to throw out the baby with the bath water, you might > consider figuring out who the parents are :) > Yes, I fi

Re: [rspec-users] Cucumber ".should contain(expected) does but fails anyway

2009-04-22 Thread David Chelimsky
On Wed, Apr 22, 2009 at 11:08 AM, James Byrne wrote: > David Chelimsky wrote: > >> Ruby. Try this in irb: >> >> 'this' >> => "this" > > This passes: > >  assert_equal (expected, >                fx_doc.xpath('//rdf:RDF/xmlns:channel/xmlns:title').to_s, >                "#{expected} not found") > >

Re: [rspec-users] Cucumber ".should contain(expected) does but fails anyway

2009-04-22 Thread James Byrne
David Chelimsky wrote: > Ruby. Try this in irb: > > 'this' > => "this" This passes: assert_equal (expected, fx_doc.xpath('//rdf:RDF/xmlns:channel/xmlns:title').to_s, "#{expected} not found") This does not: fx_doc.xpath('//rdf:RDF/xmlns:channel/xmlns:title')

Re: [rspec-users] Cucumber ".should contain(expected) does but fails anyway

2009-04-22 Thread David Chelimsky
On Wed, Apr 22, 2009 at 10:02 AM, James Byrne wrote: > > When I change the test to: > >  expected = 'Bank of Canada: Noon Foreign Exchange > Rates' >  fx_doc.xpath('//rdf:RDF/xmlns:channel/xmlns:title').should =~ expected > > Then I see this instead: > >  expected: "Bank of Canada: Noon Foreign Ex

Re: [rspec-users] Cucumber ".should contain(expected) does but fails anyway

2009-04-22 Thread James Byrne
When I change the test to: expected = 'Bank of Canada: Noon Foreign Exchange Rates' fx_doc.xpath('//rdf:RDF/xmlns:channel/xmlns:title').should =~ expected Then I see this instead: expected: "Bank of Canada: Noon Foreign Exchange Rates", got: Bank of Canada: Noon Foreign Exchange

[rspec-users] Cucumber ".should contain(expected) does but fails anyway

2009-04-22 Thread James Byrne
This is the step definition: When /the xml document should have the Bank of Canada title/ do expected = 'Bank of Canada: Noon Foreign Exchange Rates' fx_doc = ForexCASource.new(@xchg_source) puts fx_doc.xpath('//rdf:RDF/xmlns:channel/xmlns:title') fx_doc.xpath('//rdf:RDF/xmlns:channel/xmln