Module: HaveAPI::ApiBuilder
- Defined in:
- lib/haveapi/spec/helpers.rb
Overview
Contains methods for specification of API to be used in description block.
Instance Method Summary collapse
- #auth_chain(chain) ⇒ Object
- #default_version(v) ⇒ Object
- #login(*credentials) ⇒ Object
- #mount_to(path) ⇒ Object
- #use_version(v) ⇒ Object
Instance Method Details
#auth_chain(chain) ⇒ Object
6 7 8 |
# File 'lib/haveapi/spec/helpers.rb', line 6 def auth_chain(chain) @auth_chain = chain end |
#default_version(v) ⇒ Object
16 17 18 |
# File 'lib/haveapi/spec/helpers.rb', line 16 def default_version(v) @default_version = v end |
#login(*credentials) ⇒ Object
24 25 26 27 28 29 30 |
# File 'lib/haveapi/spec/helpers.rb', line 24 def login(*credentials) @username, @password = credentials before(:each) do (*credentials) end end |
#mount_to(path) ⇒ Object
20 21 22 |
# File 'lib/haveapi/spec/helpers.rb', line 20 def mount_to(path) @mount = path end |
#use_version(v) ⇒ Object
10 11 12 13 14 |
# File 'lib/haveapi/spec/helpers.rb', line 10 def use_version(v) before(:each) do @versions = v end end |