Re: [rspec-users] [module announcement] Equivalency testing for XML

2011-03-24 Thread James Martin
On Fri, Mar 25, 2011 at 3:59 AM, Michael B. Klein wrote: > Hello all, > > I recently released a gem that assists in testing XML nodes > for equivalency, and thought it might be of interest to the RSpec community. > It can normalize whitespace (or not), ignore element order (or not), compare > nam

Re: [rspec-users] stubbing mongoid::criteria in view code

2011-03-24 Thread Justin Ko
On Thu, Mar 24, 2011 at 10:22 AM, amkirwan wrote: > I'm try to stub the following in my view code but keep running into > problems with unexpected messages. I've tried stubbing and mocking in > many combinations but can't find away past this. Here is the code > below I am trying to spec > > ... >

[rspec-users] [module announcement] Equivalency testing for XML

2011-03-24 Thread Michael B. Klein
Hello all, I recently released a gem that assists in testing XML nodes for equivalency, and thought it might be of interest to the RSpec community. It can normalize whitespace (or not), ignore element order (or not), compare namespaces based on URI (not prefix), and more. Plus -- and possibly best

[rspec-users] stubbing mongoid::criteria in view code

2011-03-24 Thread amkirwan
I'm try to stub the following in my view code but keep running into problems with unexpected messages. I've tried stubbing and mocking in many combinations but can't find away past this. Here is the code below I am trying to spec ... - if page.parent_id.nil? %td - else

Re: [rspec-users] How to test a Rails 3 metal controller?

2011-03-24 Thread Thibaut Barrère
Hello David, > Use a request spec (in spec/requests) instead of a controller spec. Thanks, it worked perfectly! I only encountered a "stack level too deep" error, which was solved by upgrading rspec from 2.0.1 to 2.5.0, if it helps someone. Thanks again! -- Thibaut