moro-miso 0.0.3 → 0.0.4
Sign up to get free protection for your applications and to get access to all the features.
- data/ChangeLog +4 -0
- data/lib/miso.rb +1 -1
- data/rails_generators/miso/templates/webrat_ja_steps.rb +21 -21
- metadata +2 -2
data/ChangeLog
CHANGED
data/lib/miso.rb
CHANGED
@@ -3,33 +3,33 @@ require File.expand_path(File.join(File.dirname(__FILE__), "..", "support", "pat
|
|
3
3
|
# Commonly used webrat steps
|
4
4
|
# http://github.com/brynary/webrat
|
5
5
|
|
6
|
-
visit = lambda{|page_name|
|
6
|
+
visit = lambda{|page_name| Given "I am on #{page_name}" }
|
7
7
|
|
8
8
|
Given(/^"([^\"]*)"ページを表示している$/, &visit)
|
9
9
|
When(/^"([^\"]*)"ページを表示する$/, &visit)
|
10
10
|
|
11
11
|
When /^"([^\"]*)"ボタンをクリックする$/ do |button|
|
12
|
-
|
12
|
+
When %Q(I press "#{button}")
|
13
13
|
end
|
14
14
|
|
15
15
|
When /^"([^\"]*)"リンクをクリックする$/ do |link|
|
16
|
-
|
16
|
+
When %Q(I follow "#{link}")
|
17
17
|
end
|
18
18
|
|
19
19
|
When /^"([^\"]*)"に"([^\"]*)"と入力する$/ do |field, value|
|
20
|
-
|
20
|
+
When %Q(I fill in "#{field}" with "#{value}")
|
21
21
|
end
|
22
22
|
|
23
23
|
# opposite order from Engilsh one(original)
|
24
24
|
When /^"([^\"]*)"から"([^\"]*)"を選択する$/ do |field, value|
|
25
|
-
select
|
25
|
+
When %Q(I select "#{value}" from "#{field}")
|
26
26
|
end
|
27
27
|
|
28
28
|
# Use this step in conjunction with Rail's datetime_select helper. For example:
|
29
29
|
# When I select "December 25, 2008 10:00" as the date and time
|
30
30
|
# TODO 日本語が変だ
|
31
31
|
When /^日時として"([^\"]*)"を選択する$/ do |time|
|
32
|
-
|
32
|
+
When %Q(I select "#{time}" as the date and time)
|
33
33
|
end
|
34
34
|
|
35
35
|
# Use this step when using multiple datetime_select helpers on a page or
|
@@ -42,7 +42,7 @@ end
|
|
42
42
|
# When I select "November 23, 2004 11:20" as the "Preferred" date and time
|
43
43
|
# And I select "November 25, 2004 10:30" as the "Alternative" date and time
|
44
44
|
When /^"([^\"]*)"の日時として"([^\"]*)"を選択する$/ do |datetime_label, datetime|
|
45
|
-
|
45
|
+
When %Q(I select "#{datetime_label}" as the "#{datetime}" date and time)
|
46
46
|
end
|
47
47
|
|
48
48
|
# Use this step in conjunction with Rail's time_select helper. For example:
|
@@ -50,67 +50,67 @@ end
|
|
50
50
|
# Note: Rail's default time helper provides 24-hour time-- not 12 hour time. Webrat
|
51
51
|
# will convert the 2:20PM to 14:20 and then select it.
|
52
52
|
When /^日付として"([^\"]*)"を選択する$/ do |time|
|
53
|
-
|
53
|
+
When %Q(I select "#{time}" as the time)
|
54
54
|
end
|
55
55
|
|
56
56
|
# Use this step when using multiple time_select helpers on a page or you want to
|
57
57
|
# specify the name of the time on the form. For example:
|
58
58
|
# When I select "7:30AM" as the "Gym" time
|
59
59
|
When /^"([^\"]*)"の日付として"([^\"]*)"を選択する$/ do |time_label, time|
|
60
|
-
|
60
|
+
When %Q(I select "#{time_label}" as the "#{time}" time)
|
61
61
|
end
|
62
62
|
|
63
63
|
# Use this step in conjunction with Rail's date_select helper. For example:
|
64
64
|
# When I select "February 20, 1981" as the date
|
65
65
|
When /^時間として"([^\"]*)"を選択する$/ do |date|
|
66
|
-
|
66
|
+
When %Q(I select "#{date}" as the date)
|
67
67
|
end
|
68
68
|
|
69
69
|
# Use this step when using multiple date_select helpers on one page or
|
70
70
|
# you want to specify the name of the date on the form. For example:
|
71
71
|
# When I select "April 26, 1982" as the "Date of Birth" date
|
72
72
|
When /^"([^\"]*)"の時間として"([^\"]*)"を選択する$/ do |date_label, date|
|
73
|
-
|
73
|
+
When %Q(I select "#{datetime_label}" as the "#{date}" date)
|
74
74
|
end
|
75
75
|
|
76
76
|
When /^"([^\"]*)"をチェックする$/ do |field|
|
77
|
-
check
|
77
|
+
When %Q(I check "#{field}")
|
78
78
|
end
|
79
79
|
|
80
80
|
When /^"([^\"]*)"のチェックを外す$/ do |field|
|
81
|
-
uncheck
|
81
|
+
When %Q(I uncheck "#{field}")
|
82
82
|
end
|
83
83
|
|
84
84
|
When /^"([^\"]*)"を選択する$/ do |field|
|
85
|
-
choose
|
85
|
+
When %Q(I choose "#{field}")
|
86
86
|
end
|
87
87
|
|
88
88
|
# opposite order from Engilsh one(original)
|
89
89
|
When /^"([^\"]*)"としてファイル"([^\"]*)"を選択する$/ do |field, path|
|
90
|
-
|
90
|
+
When %Q(I attach the file at "#{path}" to "#{field}")
|
91
91
|
end
|
92
92
|
|
93
93
|
Then /^"([^\"]*)"と表示されていること$/ do |text|
|
94
|
-
|
94
|
+
Then %Q(I should see "#{text}")
|
95
95
|
end
|
96
96
|
|
97
97
|
Then /^"([^\"]*)"と表示されていないこと$/ do |text|
|
98
|
-
|
98
|
+
Then %Q(I should not see "#{text}")
|
99
99
|
end
|
100
100
|
|
101
101
|
Then /^入力項目"([^\"]*)"に"([^\"]*)"と表示されていること$/ do |field, value|
|
102
|
-
|
102
|
+
Then %Q(the "#{field}" field should contain "#{value}")
|
103
103
|
end
|
104
104
|
|
105
105
|
Then /^入力項目"([^\"]*)"に"([^\"]*)"と表示されていないこと$/ do |field, value|
|
106
|
-
|
106
|
+
Then %Q(the "#{field}" field should not contain "#{value}")
|
107
107
|
end
|
108
108
|
|
109
109
|
Then /^"([^\"]*)"がチェックされていること$/ do |label|
|
110
|
-
|
110
|
+
Then %Q(the "#{label}" checkbox should be checked)
|
111
111
|
end
|
112
112
|
|
113
113
|
Then /^"([^\"]*)"ページを表示していること$/ do |page_name|
|
114
|
-
|
114
|
+
Then %Q(I should be on #{page_name})
|
115
115
|
end
|
116
116
|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: moro-miso
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- MOROHASHI Kyosuke
|
@@ -9,7 +9,7 @@ autorequire:
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date: 2009-05-
|
12
|
+
date: 2009-05-27 00:00:00 -07:00
|
13
13
|
default_executable: miso-cheat
|
14
14
|
dependencies: []
|
15
15
|
|