rspec "it" string
Posted
by geosteve
on Stack Overflow
See other posts from Stack Overflow
or by geosteve
Published on 2010-04-15T04:44:12Z
Indexed on
2010/04/15
4:53 UTC
Read the original article
Hit count: 296
Is it possible for an rspec method to get the value of the parameter passed to it() in the local method? For example, if I want:
describe Me do
it "should figure this out"
puts "I " + SPEC_NAME
end
end
to print this:
I should figure this out
... what would I put for SPEC_NAME in the code sample?
Even better, how would a relatively new rubologist like me figure this out on his own?
© Stack Overflow or respective owner