moro-miso 0.0.3 → 0.0.4

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/ChangeLog CHANGED
@@ -1,3 +1,7 @@
1
+ == 0.0.4 / 2009-05-27
2
+
3
+ * use webrat original steps via Given/When/Then from jp. steps.
4
+
1
5
  == 0.0.3 / 2009-05-24
2
6
 
3
7
  * add cheat command miso-cheat, display provided steps.
@@ -1,4 +1,4 @@
1
1
 
2
2
  module Miso
3
- Version = '0.0.3'
3
+ Version = '0.0.4'
4
4
  end
@@ -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| visit path_to(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
- click_button(button)
12
+ When %Q(I press "#{button}")
13
13
  end
14
14
 
15
15
  When /^"([^\"]*)"リンクをクリックする$/ do |link|
16
- click_link(link)
16
+ When %Q(I follow "#{link}")
17
17
  end
18
18
 
19
19
  When /^"([^\"]*)"に"([^\"]*)"と入力する$/ do |field, value|
20
- fill_in(field, :with => value)
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(value, :from => field)
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
- select_datetime(time)
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
- select_datetime(datetime, :from => datetime_label)
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
- select_time(time)
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
- select_time(time, :from => time_label)
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
- select_date(date)
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
- select_date(date, :from => date_label)
73
+ When %Q(I select "#{datetime_label}" as the "#{date}" date)
74
74
  end
75
75
 
76
76
  When /^"([^\"]*)"をチェックする$/ do |field|
77
- check(field)
77
+ When %Q(I check "#{field}")
78
78
  end
79
79
 
80
80
  When /^"([^\"]*)"のチェックを外す$/ do |field|
81
- uncheck(field)
81
+ When %Q(I uncheck "#{field}")
82
82
  end
83
83
 
84
84
  When /^"([^\"]*)"を選択する$/ do |field|
85
- choose(field)
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
- attach_file(field, path)
90
+ When %Q(I attach the file at "#{path}" to "#{field}")
91
91
  end
92
92
 
93
93
  Then /^"([^\"]*)"と表示されていること$/ do |text|
94
- response.should contain(text)
94
+ Then %Q(I should see "#{text}")
95
95
  end
96
96
 
97
97
  Then /^"([^\"]*)"と表示されていないこと$/ do |text|
98
- response.should_not contain(text)
98
+ Then %Q(I should not see "#{text}")
99
99
  end
100
100
 
101
101
  Then /^入力項目"([^\"]*)"に"([^\"]*)"と表示されていること$/ do |field, value|
102
- field_labeled(field).value.should =~ /#{value}/
102
+ Then %Q(the "#{field}" field should contain "#{value}")
103
103
  end
104
104
 
105
105
  Then /^入力項目"([^\"]*)"に"([^\"]*)"と表示されていないこと$/ do |field, value|
106
- field_labeled(field).value.should_not =~ /#{value}/
106
+ Then %Q(the "#{field}" field should not contain "#{value}")
107
107
  end
108
108
 
109
109
  Then /^"([^\"]*)"がチェックされていること$/ do |label|
110
- field_labeled(label).should be_checked
110
+ Then %Q(the "#{label}" checkbox should be checked)
111
111
  end
112
112
 
113
113
  Then /^"([^\"]*)"ページを表示していること$/ do |page_name|
114
- URI.parse(current_url).path.should == path_to(page_name)
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.3
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-25 00:00:00 -07:00
12
+ date: 2009-05-27 00:00:00 -07:00
13
13
  default_executable: miso-cheat
14
14
  dependencies: []
15
15