Skip to content

Commit

Permalink
Adding spec for DOS line endings.
Browse files Browse the repository at this point in the history
  • Loading branch information
aslakhellesoy committed Oct 5, 2008
1 parent fd3870e commit 6734f23
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 0 deletions.
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
spec/cucumber/treetop_parser/test_dos.feature -crlf
5 changes: 5 additions & 0 deletions spec/cucumber/treetop_parser/feature_parser_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,11 @@ module TreetopParser
f.should have(0).scenarios
end

it "should parse features with dos line endings" do
p = FeatureParser.new
f = p.parse_feature(File.dirname(__FILE__) + '/test_dos.feature')
f.should have(5).scenarios
end
end
end
end
24 changes: 24 additions & 0 deletions spec/cucumber/treetop_parser/test_dos.feature
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
Feature: Search
In order to learn cucumber
As an engineer
I want to run some simple tests

Scenario: 1) Reverse a String
Given a string "abc"
When the string is reversed
Then the string should be "cba"

|input |output|
|a |a |
|ab |ba |

Scenario: 2) Upcase a String
Given a string "abc"
When the string is upcased
Then the string should be "ABC"

Scenario: 3) Combining 2 Methods
Given a string "abc"
When the string is upcased
And the string is reversed
Then the string should be "CBA"

0 comments on commit 6734f23

Please sign in to comment.