Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Undefined method it_behaves_like / it_should_behave_like / include_examples

I'm getting undefined method for it_behaves_like, it_should_behave_like and include_examples.

The test is on spec/features. I'm including the file with the shared_examples/shared_examples_for.

What's going on?

like image 208
Manuel Avatar asked Apr 27 '13 15:04

Manuel


1 Answers

The problem was that I had the it_behaves_like inside an it "..." do and not a describe "..." do. I didn't notice it because it was a slow integration test and I had a few assertions inside the "it" block. Preparing an example for aceofbassgreg made me realize the error.

like image 58
Manuel Avatar answered Oct 16 '22 16:10

Manuel