How do I get access to object being described?
Posted
by Bill T
on Stack Overflow
See other posts from Stack Overflow
or by Bill T
Published on 2010-05-30T14:36:21Z
Indexed on
2010/05/30
14:42 UTC
Read the original article
Hit count: 259
rspec
If I have an example such as the following:
describe "A flux capacitor" do
it "should flux a lot" do
# how can I access the string object "A flux capacitor" in here???
...
end
end
How can I access the described string object "A flux capacitor"? I've tried a few permutations of 'described_type' and 'described_class' Such as:
self.described_type.to_s
But these always return nothing. What am I doing wrong?
Thanks, -Bill
© Stack Overflow or respective owner