Skip to content

Instantly share code, notes, and snippets.

@jmoody
Created February 20, 2015 12:15
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jmoody/f631f7af98b93ad58bbe to your computer and use it in GitHub Desktop.
Save jmoody/f631f7af98b93ad58bbe to your computer and use it in GitHub Desktop.
```
# The public API is true/false, but we need to pass a path to a dylib to
# run-loop.
- if args.fetch(:inject_dylib, false)
- if simulator_target?(args)
- args[:inject_dylib] = Calabash::Dylibs.path_to_sim_dylib
- else
- args[:inject_dylib] = Cucumber::Dylibs.path_to_device_dylib
+ use_dylib = args.fetch(:inject_dylib, nil)
+ if use_dylib
+ if !File.exist?(use_dylib)
+ if simulator_target?(args)
+ args[:inject_dylib] = Calabash::Dylibs.path_to_sim_dylib
+ else
+ args[:inject_dylib] = Cucumber::Dylibs.path_to_device_dylib
+ end
end
```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment