coulda_web_steps 0.6.5 → 0.6.6

Sign up to get free protection for your applications and to get access to all the features.
@@ -5,7 +5,7 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{coulda_web_steps}
8
- s.version = "0.6.5"
8
+ s.version = "0.6.6"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["elight"]
@@ -20,6 +20,21 @@ module Coulda
20
20
  end
21
21
  end
22
22
 
23
+ def then_page_should_have_selector(selector)
24
+ Then "page should have selector '#{selector}'" do
25
+ assert page.has_selector?(selector),
26
+ "Page is missing expected selector '#{selector}'"
27
+ end
28
+ end
29
+
30
+ def then_page_should_not_have_selector(selector)
31
+ Then "page should have selector '#{selector}'" do
32
+ assert !page.has_selector?(selector),
33
+ "Page has selector '#{selector}' that should not be present"
34
+ end
35
+ end
36
+
37
+
23
38
  # Asserts that the current page has *content* and a Then step that reads like
24
39
  # "Then I should see 'You're not cookin!'"
25
40
  # @param content The content to check for.
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: coulda_web_steps
3
3
  version: !ruby/object:Gem::Version
4
- hash: 13
4
+ hash: 11
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 6
9
- - 5
10
- version: 0.6.5
9
+ - 6
10
+ version: 0.6.6
11
11
  platform: ruby
12
12
  authors:
13
13
  - elight