Skip to content

Commit

Permalink
Monkeypatch Cucumber for Ruby 2.2.0 compat
Browse files Browse the repository at this point in the history
  • Loading branch information
mislav committed Dec 24, 2014
1 parent 4261fbf commit bdb7329
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions features/support/env.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,16 @@
require 'fileutils'
require 'forwardable'

# Ruby 2.2.0 compat
Cucumber::Ast::Step.class_eval do
undef_method :text_length
def text_length(name=name())
self.class::INDENT + self.class::INDENT +
keyword.unpack('U*').length +
name.unpack('U*').length
end
end

system_git = `which git 2>/dev/null`.chomp
lib_dir = File.expand_path('../../../lib', __FILE__)
bin_dir = File.expand_path('../fakebin', __FILE__)
Expand Down

0 comments on commit bdb7329

Please sign in to comment.