mdoel-cukesteps 0.6.1 → 0.6.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/README.rdoc +3 -0
- data/VERSION +1 -1
- data/cukesteps.gemspec +1 -1
- data/lib/common_steps.rb +21 -0
- metadata +3 -2
data/README.rdoc
CHANGED
@@ -80,6 +80,9 @@ The steps available here are:
|
|
80
80
|
- Then I should see n foos in the bar (e.g. Then I should see 4 listings in the search-results)
|
81
81
|
- Then I should see n to m foos in the bar (e.g. Then I should see 3 to 5 listings in the search-results)
|
82
82
|
- Then the baz in the bar should contain a foo (e.g. Then the map in the search-results should contain a resizer)
|
83
|
+
- Then the page title should be "Login"
|
84
|
+
- Then the page title should contain "Login"
|
85
|
+
- Then flash should display "your update succeeded!" notice
|
83
86
|
|
84
87
|
The negation of each of the above is also available (e.g. Then I should not see a listing in the search-results)
|
85
88
|
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.6.
|
1
|
+
0.6.3
|
data/cukesteps.gemspec
CHANGED
data/lib/common_steps.rb
CHANGED
@@ -61,6 +61,27 @@ Then /^the (\S+) in the (\S+) should( not)? contain an? (\S+)$/ do |middle_eleme
|
|
61
61
|
response.send matcher, have_tag("##{outer_element} ##{middle_element} .#{inner_element}")
|
62
62
|
end
|
63
63
|
|
64
|
+
# Test for page title. E.g.:
|
65
|
+
# Then the page title should be "Login"
|
66
|
+
Then /^the page title should( not)? be "(.*)"$/ do |negation, expectation|
|
67
|
+
matcher = negation.blank? ? :should : :should_not
|
68
|
+
response.send matcher, have_tag('title', CGI::escapeHTML(expectation))
|
69
|
+
end
|
70
|
+
|
71
|
+
# Test for presence in page title. E.g.:
|
72
|
+
# Then the page title should contain "Login"
|
73
|
+
Then /^the page title should( not)? contain "(.*)"$/ do |negation, expectation|
|
74
|
+
matcher = negation.blank? ? :should : :should_not
|
75
|
+
response.send matcher, have_tag('title', /#{CGI::escapeHTML(expectation)}/)
|
76
|
+
end
|
77
|
+
|
78
|
+
# Test for presence in a particular flash. E.g.:
|
79
|
+
# Then flash should display "your update succeeded!" notice
|
80
|
+
Then /^flash should( not)? display "([^\"]*)" (\S+)$/ do |negation, message, message_type|
|
81
|
+
matcher = negation.blank? ? :should : :should_not
|
82
|
+
flash[message_type.to_sym].send(:eql?, message)
|
83
|
+
end
|
84
|
+
|
64
85
|
# Steps for creating objects that can be associated with other objects
|
65
86
|
Given /^the following (\S+) exist$/ do |model_class_name,table|
|
66
87
|
build_cuke_objects model_class_name, table
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: mdoel-cukesteps
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.6.
|
4
|
+
version: 0.6.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Mike Doel
|
@@ -36,6 +36,7 @@ files:
|
|
36
36
|
- test/test_helper.rb
|
37
37
|
has_rdoc: false
|
38
38
|
homepage: http://github.com/mdoel/cukesteps/tree/master
|
39
|
+
licenses:
|
39
40
|
post_install_message:
|
40
41
|
rdoc_options:
|
41
42
|
- --charset=UTF-8
|
@@ -56,7 +57,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
56
57
|
requirements: []
|
57
58
|
|
58
59
|
rubyforge_project:
|
59
|
-
rubygems_version: 1.
|
60
|
+
rubygems_version: 1.3.5
|
60
61
|
signing_key:
|
61
62
|
specification_version: 3
|
62
63
|
summary: General purpose step definitions for Cucumber
|