Re: [rspec-users] Comparing two XML documents

2011-01-31 Thread Matt Wynne
On 31 Jan 2011, at 08:26, Pat Maddox wrote: > I load my XML docs into a hash using Hash#from_xml and then compare the > hashes. Bullseye! Thanks Pat. > On Jan 26, 2011, at 7:26 AM, Matt Wynne wrote: > >> I have a problem. I have a test that needs to assert that one XML document >> looks exac

Re: [rspec-users] Difference between :each and :all

2011-01-31 Thread David Chelimsky
On Jan 31, 2011, at 3:38 AM, Evgeniy Dolzhenko wrote: > Btw. there is also before(:suite), and working from there wouldn't it make > sense to have > > 1. before(:suite) > 2. before(:group) > 3. before(:example) > > which would reflect the hierarchy of RSpec run (i.e. suite > group > example).

Re: [rspec-users] Difference between :each and :all

2011-01-31 Thread Steven Rogers
On Jan 31, 2011, at 3:38 AM, Evgeniy Dolzhenko wrote: > Btw. there is also before(:suite), and working from there wouldn't it make > sense to have > > 1. before(:suite) > 2. before(:group) > 3. before(:example) > > which would reflect the hierarchy of RSpec run (i.e. suite > group > example).

[rspec-users] feedback on feature request

2011-01-31 Thread David Chelimsky
Hey all, There is a feature request for rspec-core that I'd like to see some opinions about. The idea is to be able to reference subjects and methods defined with let() in parent groups from within the subject() and let() methods in a child group. Two approaches are to use super or a block argu

Re: [rspec-users] Ability to stub a method differently the second time its called

2011-01-31 Thread Rob Aldred
On 26 Jan 2011, at 15:29, David Chelimsky wrote: > On Jan 26, 2011, at 7:34 AM, Rob Aldred wrote: > >> I'm having a bit of trouble stubbing out a method on a model which has some >> quite specific behaviour. >> Basically I want to check the method returns something different after ive >> calle

[rspec-users] Command with -l and shared examples

2011-01-31 Thread Rob Aldred
I cannot use the -l option on a spec that has shared examples definition. If I try to run with -l value set to a test block that is outside the shared examples group all it does it runs the tests in the shared examples block The command line docs have a note saying that the -l option will not wor

[rspec-users] Are there test:recent, test:uncommitted task alternative for RSpec

2011-01-31 Thread Evgeniy Dolzhenko
By default Rails provides these task to test_unit tests: > rake -T rake test:recent # Run tests for recenttest:prepare / Test recent changes rake test:uncommitted# Run tests for uncommittedtest:prepare / Test changes since last checkin (only

Re: [rspec-users] Difference between :each and :all

2011-01-31 Thread Evgeniy Dolzhenko
Btw. there is also before(:suite), and working from there wouldn't it make sense to have 1. before(:suite) 2. before(:group) 3. before(:example) which would reflect the hierarchy of RSpec run (i.e. suite > group > example). Anyway likely it's too late to introduce something like this, just m

Re: [rspec-users] Difference between :each and :all

2011-01-31 Thread Pat Maddox
On Jan 27, 2011, at 6:53 PM, Rick DeNatale wrote: > On Thu, Jan 27, 2011 at 6:16 PM, David Chelimsky wrote: >> On Jan 27, 2011, at 5:11 PM, John Feminella wrote: >> >>> That's not quite right. :each runs before _each_ spec, while :all runs >>> once, before _any_ spec. >> >> Perhaps :any is a b

Re: [rspec-users] Comparing two XML documents

2011-01-31 Thread Pat Maddox
I load my XML docs into a hash using Hash#from_xml and then compare the hashes. On Jan 26, 2011, at 7:26 AM, Matt Wynne wrote: > I have a problem. I have a test that needs to assert that one XML document > looks exactly like another XML document. > > I couldn't find a way to compare them as