Extract cucumber and aruba monkey patches
This commit is contained in:
parent
0cccbc8dde
commit
47560e55c5
@ -1,41 +0,0 @@
|
||||
module Cucumber
|
||||
class Runtime
|
||||
alias :old_step_match :step_match
|
||||
|
||||
def step_match(step_name, name_to_report = nil)
|
||||
if step_name.include? ' must '
|
||||
name_to_report = step_name.dup
|
||||
step_name.gsub! ' must ', ' should '
|
||||
end
|
||||
|
||||
old_step_match(step_name, name_to_report)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
require 'aruba/cucumber'
|
||||
|
||||
|
||||
require 'cucumber/formatter/pretty'
|
||||
|
||||
module Cucumber
|
||||
module Ast
|
||||
class DocString
|
||||
alias :old_initialize :initialize
|
||||
|
||||
def initialize(string, content_type)
|
||||
old_initialize(string + "\n", content_type)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
module Formatter
|
||||
class Pretty
|
||||
alias :old_doc_string :doc_string
|
||||
|
||||
def doc_string(string)
|
||||
old_doc_string(string.chomp)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
16
features/support/env_aruba.rb
Normal file
16
features/support/env_aruba.rb
Normal file
@ -0,0 +1,16 @@
|
||||
module Cucumber
|
||||
class Runtime
|
||||
alias :old_step_match :step_match
|
||||
|
||||
def step_match(step_name, name_to_report = nil)
|
||||
if step_name.include? ' must '
|
||||
name_to_report = step_name.dup
|
||||
step_name.gsub! ' must ', ' should '
|
||||
end
|
||||
|
||||
old_step_match(step_name, name_to_report)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
require 'aruba/cucumber'
|
23
features/support/env_cucumber-doc_string.rb
Normal file
23
features/support/env_cucumber-doc_string.rb
Normal file
@ -0,0 +1,23 @@
|
||||
require 'cucumber/formatter/pretty'
|
||||
|
||||
module Cucumber
|
||||
module Ast
|
||||
class DocString
|
||||
alias :old_initialize :initialize
|
||||
|
||||
def initialize(string, content_type)
|
||||
old_initialize(string + "\n", content_type)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
module Formatter
|
||||
class Pretty
|
||||
alias :old_doc_string :doc_string
|
||||
|
||||
def doc_string(string)
|
||||
old_doc_string(string.chomp)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
Loading…
x
Reference in New Issue
Block a user