-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #625 from DuCalixte/master
Create the translations for the creole languange examples - see 'example...
- Loading branch information
Showing
6 changed files
with
73 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
features.html |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
$:.unshift(File.dirname(__FILE__) + '/../../../lib') | ||
require 'cucumber/rake/task' | ||
|
||
Cucumber::Rake::Task.new do |t| | ||
t.cucumber_opts = %w{--format pretty} | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
# language: ht | ||
Karakteristik: Adisyon | ||
Nan lòd pou fè pou evite erè komik | ||
Kòm yon moun sòt nan matematik | ||
Mwen ta vle yo dim sòm total nan antre de nimero | ||
|
||
Plan Senaryo: ajoute de nimero | ||
Sipoze mwen te antre <input_1> nan kalkilatris la | ||
Epi mwen te antre <input_2> nan kalkilatris la | ||
Lè Mwen peze <button> | ||
Rezilta a ta dwe <output> sou ekran an | ||
|
||
Egzanp: | ||
| input_1 | input_2 | button | output | | ||
| 20 | 30 | ajoute | 50 | | ||
| 2 | 5 | ajoute | 7 | | ||
| 0 | 40 | ajoute | 40 | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
# language: ht | ||
Karakteristik: Divizyon | ||
Nan lòd pou fè pou evite erè komik | ||
Kesye-a dwe kapab kalkile yon fraksyon | ||
|
||
Senaryo: nimewo regilye | ||
* Mwen te antre 3 nan kalkilatris la | ||
* Mwen te antre 2 nan kalkilatris la | ||
* Mwen peze divize | ||
* Rezilta a ta dwe 1.5 sou ekran an |
25 changes: 25 additions & 0 deletions
25
examples/i18n/ht/features/step_definitions/kalkilatris_steps.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
|
||
# encoding: utf-8 | ||
begin require 'rspec/expectations'; rescue LoadError; require 'spec/expectations'; end | ||
require 'cucumber/formatter/unicode' | ||
$:.unshift(File.dirname(__FILE__) + '/../../lib') | ||
require 'kalkilatris' | ||
|
||
Before do | ||
@kalk = Kalkilatris.new | ||
end | ||
|
||
After do | ||
end | ||
|
||
Sipoze /Mwen te antre nan (\d+) nan kalkilatris la/ do |n| | ||
@kalk.push n.to_i | ||
end | ||
|
||
Lè /Mwen peze (\w+)/ do |op| | ||
@result = @kalk.send op | ||
end | ||
|
||
Lè sa a /Rezilta a ta dwe (.*) sou ekran an/ do |result| | ||
@result.should == result.to_f | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
class Kalkilatris | ||
def push(n) | ||
@args ||= [] | ||
@args << n | ||
end | ||
|
||
def ajoute | ||
@args.inject(0){|n,sum| sum+=n} | ||
end | ||
|
||
def divize | ||
@args[0].to_f / @args[1].to_f | ||
end | ||
end |