aslakhellesoy-cucumber 0.1.14.1 → 0.1.14.2
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/examples/i18n/ko/Rakefile +6 -0
- data/examples/i18n/ko/features/addition.feature +17 -0
- data/examples/i18n/ko/features/division.feature +11 -0
- data/examples/i18n/ko/features/step_definitons/calculator_steps.rb +28 -0
- data/examples/i18n/ko/lib/calculator.rb +14 -0
- data/lib/cucumber/treetop_parser/feature_ko.rb +1951 -0
- metadata +7 -1
@@ -0,0 +1,17 @@
|
|
1
|
+
기능: 덧셈
|
2
|
+
어이없는 실수을 방지하기 위해
|
3
|
+
수학을 잘 못하는 사람으로써
|
4
|
+
두숫자의 합을 알고 싶다
|
5
|
+
|
6
|
+
예: 두 숫자를 더하기
|
7
|
+
조건 계산기에 50을 입력했음
|
8
|
+
그리고 계산기에 70을 입력했음
|
9
|
+
만일 내가 add를 누루면
|
10
|
+
그러면 화면에 출력된 결과는 120이다
|
11
|
+
그리고 결과의 class는 Fixnum이다
|
12
|
+
|
13
|
+
다른 예:
|
14
|
+
| 입력1 | 입력2 | 버튼 | 결과 | class |
|
15
|
+
| 20 | 30 | add | 50 | Fixnum |
|
16
|
+
| 2 | 5 | add | 7 | Fixnum |
|
17
|
+
| 0 | 40 | add | 40 | Fixnum |
|
@@ -0,0 +1,28 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
require 'spec/expectations'
|
3
|
+
$:.unshift(File.dirname(__FILE__) + '/../../lib')
|
4
|
+
require 'cucumber/formatters/unicode'
|
5
|
+
require 'calculator'
|
6
|
+
|
7
|
+
Before do
|
8
|
+
@calc = Calculator.new
|
9
|
+
end
|
10
|
+
|
11
|
+
After do
|
12
|
+
end
|
13
|
+
|
14
|
+
Given /^계산기에 (.*)을 입력했음$/ do |n|
|
15
|
+
@calc.push n.to_i
|
16
|
+
end
|
17
|
+
|
18
|
+
When /^내가 (.*)를 누루면$/ do |op|
|
19
|
+
@result = @calc.send op
|
20
|
+
end
|
21
|
+
|
22
|
+
Then /^화면에 출력된 결과는 (.*)이다$/ do |result|
|
23
|
+
@result.should == result.to_f
|
24
|
+
end
|
25
|
+
|
26
|
+
Then /^결과의 class는 (.*)이다$/ do |class_name|
|
27
|
+
@result.class.name.should == class_name
|
28
|
+
end
|