Nested steps

Question.
Currently rspec appears to allow for a two-step test system, like

context “abc”
it ‘should do y’ do
end
end

It might be convenient to have an arbitrary number of nests, like

context “abc”
it ‘should do y’ do

it 'should also be able to do x'
end

end
end

Thoughts?
-r

On Tue, Jan 12, 2010 at 4:40 PM, rogerdpack [email protected]
wrote:

context “abc”

Why would that be more convenient? Can you give a more concrete example
(with some sample code)?

David

On 12 Jan 2010, at 22:40, rogerdpack wrote:

context “abc”
it ‘should do y’ do

it ‘should also be able to do x’
end

end

You do realise you can already nest contexts don’t you? That makes
much more sense to me than what you’ve suggested.

end

Thoughts?
-r


rspec-users mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/rspec-users

cheers,
Matt

http://mattwynne.net
+447974 430184

You do realise you can already nest contexts don’t you? That makes
much more sense to me than what you’ve suggested.

Hi Roger,

Here’s an example of nesting contexts that Matt is talking about:

http://gist.github.com/275798

Peace,
Phillip

You do realise you can already nest contexts don’t you? That makes
much more sense to me than what you’ve suggested.

Ahh that is what I lacked.

That should suffice.
Thanks!
-r

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs