I'm having some trouble with Rspec accepting the scope of one of my let
definitions.
Here's my test, the classes all work fine as when I have them print out they're sweet.
code removed due to silly error
Thanks in advance!
You're missing the do
and end
for your it
block:
describe "Initialisation of order within User object" do
it "Creates an order property set to an empty array" do
expect(user.instance_variable_defined?(:@orders)).to be(true)
expect(user.instance_variable_get(:@orders)).to eq([])
end
end
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.