does rspec have any concept like
given "a certain set of paths" do
it "should be able to recreate them" do; end
it "..."; end
end
?
Thanks.
-r
_______________________________________________
rspec-users mailing list
rspec...@rubyforge.org
http://rubyforge.org/mailman/listinfo/rspec-users
Forgive me if the question is a common one...
does rspec have any concept like
given "a certain set of paths" do
it "should be able to recreate them" do; end
it "..."; end
end
It looks like that merb extension was about injecting a part of a
before block by adding an option to describe, yes?
http://www.mail-archive.com/rspec...@rubyforge.org/msg07327.html
I don't see that that's what Roger is asking for though. It seems to
me that he's asking more for yet another synonym for describe or
context.
In which case I'd suggest just using describe or context as in:
context "given a certain set of paths" do
before(:each) do
# code to set up the paths however the included specs need them, e.g.
@paths = ["a/b", "c/d"]
end
it "should be able to recreate them" do; end
it "..."; end
end
I tend to use describe for the top level, and context when nested.
--
Rick DeNatale
Blog: http://talklikeaduck.denhaven2.com/
Twitter: http://twitter.com/RickDeNatale
WWR: http://www.workingwithrails.com/person/9021-rick-denatale
LinkedIn: http://www.linkedin.com/in/rickdenatale
Ahh so it's called context.
Cool (though I'll admit that naming it "given" can make it sound more
like an English sentence, so an alias would be a suggestion).
Much thanks.
-r
Ahh so it's called context.
> context "given a certain set of paths" do
Cool (though I'll admit that naming it "given" can make it sound more
like an English sentence, so an alias would be a suggestion).
Much thanks.
-r