Module: PageLoadAssertions

Defined in:
lib/subelsky_power_tools/page_load_assertions.rb

Overview

assertions for use with Capybara

Instance Method Summary collapse

Instance Method Details

#should_404(path) ⇒ Object



13
14
15
16
# File 'lib/subelsky_power_tools/page_load_assertions.rb', line 13

def should_404(path)
  page.current_path.should == path
  page.status_code.should == 404
end

#should_load(path) ⇒ Object



8
9
10
11
# File 'lib/subelsky_power_tools/page_load_assertions.rb', line 8

def should_load(path)
  page.current_path.should == path
  page.status_code.should == 200
end

#visit!(path, *args) ⇒ Object



3
4
5
6
# File 'lib/subelsky_power_tools/page_load_assertions.rb', line 3

def visit!(path,*args)
  visit path,*args
  should_load(path)
end