Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ## string
- Story: String manipulation
- As a developer
- I want to manipulate strings
- ...
- Profit!
- Scenario: String reversal
- Given the string Linux
- When the string is reversed
- Then the result should be xuniL
- ## story_spec.rb
- require 'rubygems'
- require 'spec/story'
- steps_for(:string_manipulation) do
- Given("the string $string") do |string|
- @string = string
- end
- When("the string is reversed") do
- @string.reverse!
- end
- Then("the result should be $result") do |result|
- @string.should == result
- end
- end
- with_steps_for(:string_manipulation) do
- run "string"
- end
Add Comment
Please, Sign In to add comment