mechanical-cuke 0.4.1 → 0.4.2

Sign up to get free protection for your applications and to get access to all the features.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.4.1
1
+ 0.4.2
@@ -10,3 +10,5 @@ Feature: Missing Fields
10
10
  When I check a nonexistent check box an error should be raised
11
11
  When I press a nonexistent button an error should be raised
12
12
  When I select a missing option from an existing select an error should be raised
13
+ When I follow a nonexistent link an error should be raised
14
+
@@ -25,6 +25,12 @@ When /^I (?:fill in|select|choose|check|press) a nonexistent (.+) an error shoul
25
25
  end
26
26
  end
27
27
 
28
+ When /^I follow a nonexistent link an error should be raised$/ do
29
+ assert_raise(RuntimeError) do
30
+ When %{I follow "nonexistent"}
31
+ end
32
+ end
33
+
28
34
  When /^I select a missing option from an existing select an error should be raised$/ do
29
35
  assert_raise(RuntimeError) do
30
36
  When %{I select "nonexistent" from "Exists"}
@@ -13,7 +13,9 @@ When /^(?:|I )press "([^\"]*)"$/ do |value|
13
13
  end
14
14
 
15
15
  When /^(?:|I )follow "([^\"]*)"$/ do |link|
16
- current_page.link_with(:text => link).click
16
+ l = current_page.link_with(:text => link)
17
+ raise "Can't find link \"#{link}\"" if l.nil?
18
+ l.click
17
19
  end
18
20
 
19
21
  When /^(?:|I )fill in "([^\"]*)" with "([^\"]*)"$/ do |field, value|
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mechanical-cuke
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.1
4
+ version: 0.4.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Spike Ilacqua
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2010-08-21 00:00:00 -06:00
12
+ date: 2010-08-23 00:00:00 -06:00
13
13
  default_executable:
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency