It would be reasonable to test this behavior. In this case we do need to stub out the underlying behavior of the `opkg` function, so something like this should work:

```ruby
context "when the opkg install command fails" do
  before do
    Dir.stubs(:entries).returns ['.', '..', 'file'] # Ensure opkg('update') doesn't run
  end

  it "raises an error" do
    Puppet::Util::Execution.expects(:execute).raises Puppet::ExecutionFailure
    expect { @provider.install }.to raise_error, Puppet::ExecutionFailure
  end
end
```