Add in a missing require_relative link for gem_helper.rb (similar to those added in 2ca63b73)
Also in PR #5 ChefF5 was changed from a class name to a module name and the methods previously living in ChefF5 were moved to live inside a new class called ChefF5::Client.
With those (and similar) expectations now targeting the wrong class all 7 tests were failing with errors about unmocked call chains on the doubles:
1) f5_test::test_create_pool managing the pool the pool does not exist creates the pool
Failure/Error: ChefSpec::SoloRunner.new(platform: 'ubuntu', version: '14.04', step_into: ['f5_pool']).converge(described_recipe)
#<Double (anonymous)> received unexpected message :NodeAddressV2 with (no args)
# ./libraries/chef_f5.rb:10:in `node_is_missing?'
# /var/folders/q7/rcn_34yx7pvb0n7sch3flr5c0000gn/T/d20170824-38667-1n06w2a/cookbooks/f5/resources/pool.rb:21:in `block in class_from_file'
# ./spec/unit/recipes/test_create_pool_spec.rb:11:in `block (2 levels) in <top (required)>'
# ./spec/unit/recipes/test_create_pool_spec.rb:41:in `block (4 levels) in <top (required)>'
This PR adjusts the mocking in the rspec contexts to correctly target the new ChefF5::Client class and all 7 specs are passing again.
Add in a missing
require_relative
link forgem_helper.rb
(similar to those added in 2ca63b73)Also in PR #5
ChefF5
was changed from a class name to a module name and the methods previously living inChefF5
were moved to live inside a new class calledChefF5::Client
.This broke the mocking which was set up in the spec tests (e.g.
test_create_pool_spec.rb
):With those (and similar) expectations now targeting the wrong class all 7 tests were failing with errors about unmocked call chains on the doubles:
This PR adjusts the mocking in the rspec contexts to correctly target the new
ChefF5::Client
class and all 7 specs are passing again.