Manuel
Manuel

Reputation: 11469

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?

Upvotes: 5

Views: 2301

Answers (1)

Manuel
Manuel

Reputation: 11469

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.

Upvotes: 11

Related Questions