Skip to content

Proposal: mock client for local dev and test ENVs #93

@davydovanton

Description

@davydovanton

Hey,

We use dry-system for booting dependencies to our project and that's why I think it will be cool to create mock client only for local usage.

Of course, we can mock LDClient in spec helper, but we want to have aт ability to develop without an internet connection too (or with a real client if we need to check something). I hope that it will be better to use the native client, something like this:

# booting app process

if container.settings.launch_darkly_sdk_key
  client = LaunchDarkly::LDClient.new(container.settings.launch_darkly_sdk_key)
else
  client = LaunchDarkly::MockClient.new
end

WDYT? I can make PR for this 👍

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions