Module: Decko::RestSpecMethods
- Defined in:
- lib/decko/rest_spec_helper.rb
Overview
for use in REST API specs
Instance Method Summary collapse
Instance Method Details
#with_api_key_for(usermark) {|key_card.content| ... } ⇒ Object
6 7 8 9 10 11 |
# File 'lib/decko/rest_spec_helper.rb', line 6 def with_api_key_for usermark key_card = Card.fetch [usermark, :account, :api_key], new: {} key_card.content = "asdkfjh1023498203jdfs" Card::Auth.as_bot { key_card.save! } yield key_card.content end |