Module: Generalis::RSpec::ResolveAccountHelper
- Defined in:
- lib/rspec/helpers/resolve_account_helper.rb
Instance Method Summary collapse
Instance Method Details
#resolve_account(locator, owner:) ⇒ Generalis::Account
9 10 11 12 13 14 15 16 17 18 |
# File 'lib/rspec/helpers/resolve_account_helper.rb', line 9 def resolve_account(locator, owner:) case locator when Generalis::Account locator when String, Symbol Generalis::Account.lookup(locator, owner: owner) else raise ArgumentError, "Expected a Generalis::Account, String, or Symbol, got #{account.inspect}" end end |