Skip to content

Commit

Permalink
Added back the method (and deprecated it)
Browse files Browse the repository at this point in the history
  • Loading branch information
aslakhellesoy committed Jul 29, 2015
1 parent 984fd70 commit 4e5bd49
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions lib/cucumber/rb_support/rb_world.rb
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,20 @@ def table(text_or_table, file=nil, line_offset=0)
@__cucumber_runtime.table(text_or_table, file, line_offset)
end

# Create an {Cucumber::Ast::DocString} object
#
# Useful in conjunction with the #step method, when
# want to specify a content type.
# @example Create a multiline string
# code = multiline_string(%{
# puts "this is ruby code"
# %}, 'ruby')
def doc_string(string_without_triple_quotes, content_type='', line_offset=0)
STDERR.puts AnsiEscapes.failed + "WARNING: #doc_string is deprecated. Just pass a regular String instead:" + caller[0] + AnsiEscapes.reset
# TODO: rename this method to multiline_string
@__cucumber_runtime.doc_string(string_without_triple_quotes, content_type, line_offset)
end

# @deprecated Use {#puts} instead.
def announce(*messages)
STDERR.puts AnsiEscapes.failed + "WARNING: #announce is deprecated. Use #puts instead:" + caller[0] + AnsiEscapes.reset
Expand Down

0 comments on commit 4e5bd49

Please sign in to comment.