Module: MechanicalCuke

Included in:
Capybara::Driver::MechanicalCuke
Defined in:
lib/mechanical-cuke.rb,
lib/mechanical-cuke/basic_auth.rb

Defined Under Namespace

Modules: BasicAuth

Class Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Class Attribute Details

.save_and_open_page_pathObject

Returns the value of attribute save_and_open_page_path.



6
7
8
# File 'lib/mechanical-cuke.rb', line 6

def save_and_open_page_path
  @save_and_open_page_path
end

Class Method Details

.configure {|_self| ... } ⇒ Object

Yields:

  • (_self)

Yield Parameters:



7
8
9
# File 'lib/mechanical-cuke.rb', line 7

def configure
  yield self
end

Instance Method Details

#basic_auth(username, password) ⇒ Object



36
37
38
# File 'lib/mechanical-cuke.rb', line 36

def basic_auth(username,password)
  mechanize.basic_auth(username,password)
end

#bodyObject



28
29
30
# File 'lib/mechanical-cuke.rb', line 28

def body
  current_page.body
end

#current_pageObject



20
21
22
# File 'lib/mechanical-cuke.rb', line 20

def current_page
  mechanize.current_page
end

#formObject



32
33
34
# File 'lib/mechanical-cuke.rb', line 32

def form
  current_page.forms.first
end

#get(url) ⇒ Object



16
17
18
# File 'lib/mechanical-cuke.rb', line 16

def get(url)
  mechanize.get(url)
end

#mechanizeObject



12
13
14
# File 'lib/mechanical-cuke.rb', line 12

def mechanize
  @mechanize ||= Mechanize.new
end

#response_bodyObject



24
25
26
# File 'lib/mechanical-cuke.rb', line 24

def response_body
  current_page.body
end