Skip to content

Commit

Permalink
documentation for new methods added
Browse files Browse the repository at this point in the history
  • Loading branch information
alexey-voronenko committed Apr 16, 2019
1 parent 1bb2aad commit 6de35a3
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions lib/howitzer.rb
Expand Up @@ -29,15 +29,25 @@ def mailgun_idle_timeout
::SexySettings::Base.instance.all['mailgun_idle_timeout']
end

# @return active session name

def session_name
@session_name ||= 'default'
end

# Sets new session name
#
# @param name [String] string identifier for the session

def session_name=(name)
@session_name = name
Capybara.session_name = @session_name
end

# Yield a block using a specific session name
#
# @param name [String] string identifier for the session

def using_session(name)
Capybara.using_session(name) { yield }
end
Expand Down

0 comments on commit 6de35a3

Please sign in to comment.