{"id":15457618,"url":"https://github.com/maoueh/chefspec-stub-problem","last_synced_at":"2025-04-01T12:25:36.646Z","repository":{"id":27197546,"uuid":"30667925","full_name":"maoueh/chefspec-stub-problem","owner":"maoueh","description":"Demonstrates a ChefSpec stub problem I have","archived":false,"fork":false,"pushed_at":"2015-02-11T20:24:46.000Z","size":120,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-10-08T03:32:39.362Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/maoueh.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-02-11T20:22:33.000Z","updated_at":"2015-02-11T20:24:46.000Z","dependencies_parsed_at":"2022-08-17T17:10:57.046Z","dependency_job_id":null,"html_url":"https://github.com/maoueh/chefspec-stub-problem","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maoueh%2Fchefspec-stub-problem","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maoueh%2Fchefspec-stub-problem/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maoueh%2Fchefspec-stub-problem/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maoueh%2Fchefspec-stub-problem/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/maoueh","download_url":"https://codeload.github.com/maoueh/chefspec-stub-problem/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246637559,"owners_count":20809632,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-01T22:48:35.818Z","updated_at":"2025-04-01T12:25:36.622Z","avatar_url":"https://github.com/maoueh.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Stubbing Problem\r\n\r\nTrying to stub a library class method defined in `Chef::Recipe` class\r\nwhich calls a program not accessible on the machine running the unit\r\ntests.\r\n\r\nThe problem is that I'm simply unable to make it work correctly.\r\n\r\n## Reproduce\r\n\r\n    bundle install\r\n    bundle exec rspec spec/recipes/default_spec.rb\r\n\r\nExpected output is a passing test\r\nActual output is an error message saying command cannot be found\r\n\r\n```\r\n$ bundle exec rspec spec/recipes/default_spec.rb\r\n\r\nCalled in spec before: 1.3\r\nCalled in spec example: 1.3\r\nCalled in spec runner new: 1.3\r\n\r\n...\r\n\r\n================================================================================\r\nRecipe Compile Error in /vagrant/stub_problem/recipes/default.rb\r\n================================================================================\r\n\r\n...\r\n\r\nFailures:\r\n\r\n  1) stub_problem::default includes default recipe\r\n     Failure/Error: end.converge(described_recipe)\r\n     Errno::ENOENT:\r\n       No such file or directory - impossible_command_to_stub\r\n     # ./libraries/stub_problem_library.rb:6:in `query'\r\n     # ./recipes/default.rb:2:in `from_file'\r\n     # ./spec/recipes/default_spec.rb:9:in `block (2 levels) in \u003ctop (required)\u003e'\r\n     # ./spec/recipes/default_spec.rb:27:in `block (2 levels) in \u003ctop (required)\u003e'\r\n\r\nFinished in 0.12096 seconds (files took 1.04 seconds to load)\r\n1 example, 1 failure\r\n\r\nFailed examples:\r\n\r\nrspec ./spec/recipes/default_spec.rb:24 # stub_problem::default includes default recipe\r\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmaoueh%2Fchefspec-stub-problem","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmaoueh%2Fchefspec-stub-problem","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmaoueh%2Fchefspec-stub-problem/lists"}