forked from cucumber/cucumber-ruby
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
added norwegian examples and extracted step node
- Loading branch information
1 parent
17f44a5
commit b45f461
Showing
21 changed files
with
305 additions
and
390 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 |
---|---|---|
@@ -1,2 +1,3 @@ | ||
nbproject | ||
pkg | ||
pkg | ||
log/*.log |
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 |
---|---|---|
@@ -1,50 +1,60 @@ | ||
History.txt | ||
License.txt | ||
Manifest.txt | ||
README.txt | ||
Rakefile | ||
bin/cucumber | ||
config/hoe.rb | ||
config/requirements.rb | ||
examples/simple/addition.story | ||
examples/simple/steps/addition_steps.rb | ||
examples/web/run_stories.story | ||
examples/web/steps/stories_steps.rb | ||
lib/cucumber.rb | ||
lib/cucumber/ansi_colours.rb | ||
lib/cucumber/cli.rb | ||
lib/cucumber/executor.rb | ||
lib/cucumber/parser/languages.yml | ||
lib/cucumber/parser/story_parser.rb | ||
lib/cucumber/parser/story_parser.treetop.erb | ||
lib/cucumber/parser/story_parser_en.rb | ||
lib/cucumber/parser/story_parser_fr.rb | ||
lib/cucumber/parser/story_parser_no.rb | ||
lib/cucumber/parser/story_parser_pt.rb | ||
lib/cucumber/pretty_printer.rb | ||
lib/cucumber/progress_formatter.rb | ||
lib/cucumber/step_methods.rb | ||
lib/cucumber/version.rb | ||
script/console | ||
script/console.cmd | ||
script/destroy | ||
script/destroy.cmd | ||
script/generate | ||
script/generate.cmd | ||
script/txt2html | ||
script/txt2html.cmd | ||
setup.rb | ||
spec/cucumber/executor_spec.rb | ||
spec/cucumber/sell_cucumbers.story | ||
spec/spec.opts | ||
spec/spec_helper.rb | ||
tasks/deployment.rake | ||
tasks/environment.rake | ||
tasks/rspec.rake | ||
tasks/treetop.rake | ||
tasks/website.rake | ||
website/index.html | ||
website/index.txt | ||
website/javascripts/rounded_corners_lite.inc.js | ||
website/stylesheets/screen.css | ||
website/template.html.erb | ||
History.txt | ||
License.txt | ||
Manifest.txt | ||
README.txt | ||
Rakefile | ||
bin/cucumber | ||
config/hoe.rb | ||
config/requirements.rb | ||
examples/simple/addition.story | ||
examples/simple/division.story | ||
examples/simple/steps/addition_steps.rb | ||
examples/simple_norwegian/steg/matte_steg.rb.rb | ||
examples/simple_norwegian/summering.story | ||
examples/web/run_stories.story | ||
examples/web/steps/stories_steps.rb | ||
lib/cucumber.rb | ||
lib/cucumber/ansi_colours.rb | ||
lib/cucumber/cli.rb | ||
lib/cucumber/executor.rb | ||
lib/cucumber/parser/languages.yml | ||
lib/cucumber/parser/nodes.rb | ||
lib/cucumber/parser/story_parser.rb | ||
lib/cucumber/parser/story_parser.treetop.erb | ||
lib/cucumber/parser/story_parser_en.rb | ||
lib/cucumber/parser/story_parser_fr.rb | ||
lib/cucumber/parser/story_parser_no.rb | ||
lib/cucumber/parser/story_parser_pt.rb | ||
lib/cucumber/pretty_printer.rb | ||
lib/cucumber/progress_formatter.rb | ||
lib/cucumber/rails/world.rb | ||
lib/cucumber/step_methods.rb | ||
lib/cucumber/stories.rb | ||
lib/cucumber/version.rb | ||
lib/cucumber/visitors/html_formatter.rb | ||
log/debug.log | ||
script/console | ||
script/console.cmd | ||
script/destroy | ||
script/destroy.cmd | ||
script/generate | ||
script/generate.cmd | ||
script/txt2html | ||
script/txt2html.cmd | ||
setup.rb | ||
spec/cucumber/executor_spec.rb | ||
spec/cucumber/sell_cucumbers.story | ||
spec/cucumber/visitors/html_formatter_spec.rb | ||
spec/cucumber/visitors/stories.html | ||
spec/spec.opts | ||
spec/spec_helper.rb | ||
tasks/deployment.rake | ||
tasks/environment.rake | ||
tasks/rspec.rake | ||
tasks/treetop.rake | ||
tasks/website.rake | ||
website/index.html | ||
website/index.txt | ||
website/javascripts/rounded_corners_lite.inc.js | ||
website/stylesheets/screen.css | ||
website/template.html.erb |
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,31 @@ | ||
require 'spec' | ||
|
||
class Calculator | ||
def push(n) | ||
@args ||= [] | ||
@args << n | ||
end | ||
|
||
def add | ||
@args.inject(0){|n,sum| sum+=n} | ||
end | ||
end | ||
|
||
Before do | ||
@calc = Calculator.new | ||
end | ||
|
||
After do | ||
end | ||
|
||
Given /at jeg har tastet inn (\d+)/ do |n| | ||
@calc.push n.to_i | ||
end | ||
|
||
When 'jeg summerer' do | ||
@result = @calc.add | ||
end | ||
|
||
Then /skal resultatet være (\d*)/ do |result| | ||
@result.should == result.to_i | ||
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,10 @@ | ||
Historie: Addition | ||
Som en matteidiot | ||
Vil jeg bli fortalt summen av to tall | ||
Slik at jeg ikke gjør dumme feil | ||
|
||
Scenario: 5+7 | ||
Gitt at jeg har tastet inn 5 | ||
Og at jeg har tastet inn 7 | ||
Når jeg summerer | ||
Så skal resultatet være 12 |
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
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
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
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
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
Oops, something went wrong.