Running into a rspec error with homebrew_package

In my custom resource, I have

homebrew_package 'amazon-ecs-cli'

In spec Test I have

it { install_homebrew_package('amazon-ecs-cli') }

The error I got was:
Failure/Error: it { install_homebrew_package('amazon-ecs-cli') }

expected "homebrew_package[amazon-ecs-cli']" with action :install to be in Chef run. Other homebrew_package resources:


Hi @meooow :wave:

If you're trying to test a custom resource, make sure you're following these instructions to "step_into" the custom resource: GitHub - chefspec/chefspec: Write RSpec examples and generate coverage reports for Chef recipes!

Also, in your output there seems to be an extra ' on the end of the amazon-ecs-cli string.