Skip to content

Instantly share code, notes, and snippets.

@gongo
Created February 9, 2016 11:27
Show Gist options
  • Save gongo/00e21949dd62c591e45d to your computer and use it in GitHub Desktop.
Save gongo/00e21949dd62c591e45d to your computer and use it in GitHub Desktop.
-r turnip/rspec
# spec/features/alternative.feature
Feature: Alternative words in step written in Japanese
Scenario: ポケットの中には?
And ポケットの中の戦争
And ポケットの中にビスケット
source "https://rubygems.org"
gem "turnip"
$ ruby -v
ruby 2.2.2p95 (2015-04-13 revision 50295) [x86_64-darwin14]
$ bundle list
Gems included by the bundle:
* bundler (1.10.6)
* diff-lcs (1.2.5)
* gherkin (2.12.2)
* multi_json (1.11.2)
* rspec (3.4.0)
* rspec-core (3.4.2)
* rspec-expectations (3.4.0)
* rspec-mocks (3.4.1)
* rspec-support (3.4.1)
* turnip (2.0.2)
$ bundle exec rspec
"戦争"
"ビスケット"
.
Finished in 0.00158 seconds (files took 0.13793 seconds to load)
1 example, 0 failures
# spec/spec_helper.rb
require 'turnip'
Dir.glob("spec/steps/*steps.rb") { |f| load f, true }
# spec/steps/steps.rb
step "ポケットの中(の/に) :item" do |item|
p item
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment