-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathsnoop_cap_rails3
59 lines (55 loc) · 1.51 KB
/
snoop_cap_rails3
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
---
# capybara migration helpers
? !ruby/regexp /request\.path/
: current_path
? !ruby/regexp /field_named/
: find_field
? !ruby/regexp /\)\.text\s+include\((.+)/
: ", :text => \1"
? !ruby/regexp /\)\.text.should == (.+)/
: ", :text => \1)"
? !ruby/regexp /current_dom\.css\((.+?)\)\.text\.include\?\((.+?)\)\.should be_true/
: "page.should have_css(\1, :text => \2)"
? !ruby/regexp /current_dom\.at\((.+?)\)\.text\.include\?\((.+?)\)\.should == true/
: "page.should have_css(\1, :text => \2)"
? !ruby/regexp /current_dom\.text\.include\?(.+?)\.should == (?:true|false)/
: "page.should have_content\1"
#? !ruby/regexp /current_dom\.at/
#: 'page.should have_css'
? !ruby/regexp /\s+check/
: "page.check"
? !ruby/regexp /\s+uncheck/
: "page.uncheck"
? !ruby/regexp /current_dom\.text\.include\?(.+?)\.(.+?)\s+be_true$/
: "page.\2 have_content\1"
# restful auth to devise helpers
? !ruby/regexp /login/
: sign_in
? !ruby/regexp /logout/
: sign_out
? !ruby/regexp /logged_in\?/
: person_signed_in?
? !ruby/regexp /Logged in successfully/
: successfully
# user to person helpers
? !ruby/regexp /user/
: person
? !ruby/regexp /User/
: Person
? !ruby/regexp /users/
: people
? !ruby/regexp /persons/
: people
? !ruby/regexp /peoples/
: people
# rspec 1 to capybara
? !ruby/regexp /response\.should have_tag/
: "page.should have_css"
# rails 2 to rails 3
? !ruby/regexp /link_to_remote (.+?), (.+)/
: "link_to \1, \2, :remote => true"
# cleanup filters
? !ruby/regexp /^\s+page\.save_and_open_page\n$/m
: ""
? !ruby/regexp /^\s+debugger\n$/m
: ""