subelsky_power_tools 1.3.3 → 1.4.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 7c27fd47fa9847c7cc2bef1defca3ffc73b826c6
4
- data.tar.gz: a837d3a02e6b69ab1143932afecf0f28c58aceb4
3
+ metadata.gz: ded758242f7d733e76c78cf38d86e803cca55913
4
+ data.tar.gz: 028f5714b9eed90a8156a1a9b70415310609b0bb
5
5
  SHA512:
6
- metadata.gz: cb465667a864089bb31aaaf3a9e2527c921d0a75c04d0422f0882e6879d1bef3628caddb8f8dfd47b553eec117e7091eb9dcc2a3d6b7999ac0d9ec3b865b37b2
7
- data.tar.gz: 128a9dfd469a2e13ce48c57ea55ef4bfa57f54ec3494a5804b39f59509a70bc09b3093342b986ee8eb774ead13586ee08b8f7c3f3052043ca2ac1743cfa11848
6
+ metadata.gz: 1b34985ef400c849c83a72320e2a2be75ccc11496561abd1137eb6d4123068854156ce62b7c3fb0b30a910953d165f1982c86a44743f43cc86cf37137be13029
7
+ data.tar.gz: 6a05855e88c530df15099437839f18c58e055095e66707ef8188d45450d625acc81f2b10ec49ced72da57e203ac9101693220191a34a992f36a344000b02c13f
@@ -1,17 +1,23 @@
1
1
  # assertions for use with Capybara
2
+ # @note requires rspec 3 or greater
2
3
  module PageLoadAssertions
4
+ # @param path [String] what path to visit
3
5
  def visit!(path,*args)
4
6
  visit path,*args
5
7
  should_load(path)
6
8
  end
7
9
 
10
+ # Asserts that the correct page has been loaded
11
+ # @param path [String] what path you're expecting load successfully after the user visits in a browser
8
12
  def should_load(path)
9
- page.current_path.should == path
10
- page.status_code.should == 200
13
+ expect(page.current_path).to eq(path)
14
+ expect(page.status_code).to eq(200)
11
15
  end
12
16
 
17
+ # Asserts that the path is being displayed but with HTTP error code 404
18
+ # @param path [String] what you're expecting to return 404 after the user visits
13
19
  def should_404(path)
14
- page.current_path.should == path
15
- page.status_code.should == 404
20
+ expect(page.current_path).to eq(path)
21
+ expect(page.status_code).to eq(404)
16
22
  end
17
23
  end
@@ -1,3 +1,3 @@
1
1
  module SubelskyPowerTools
2
- VERSION = "1.3.3"
2
+ VERSION = "1.4.0"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: subelsky_power_tools
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.3.3
4
+ version: 1.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Mike Subelsky
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-11-14 00:00:00.000000000 Z
11
+ date: 2014-11-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rspec
@@ -80,7 +80,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
80
80
  version: '0'
81
81
  requirements: []
82
82
  rubyforge_project:
83
- rubygems_version: 2.4.2
83
+ rubygems_version: 2.4.4
84
84
  signing_key:
85
85
  specification_version: 4
86
86
  summary: This is a collection of Ruby extensions and utilities I've been carting around