Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Deprecate another source tag names #229

Merged
merged 2 commits into from

3 participants

@e2
e2 commented

Deprecate another source_tag_names method for capybara.

(parent: 844fefe)

@rtlong

This fix is working for me

@mattwynne mattwynne merged commit 0396982 into from
@mattwynne
Owner

Okay 1.1.7 is out with this fix in it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Feb 18, 2012
  1. @e2

    cleanup whitespace

    e2 authored
  2. @e2
This page is out of date. Refresh to see the latest.
Showing with 15 additions and 10 deletions.
  1. +15 −10 lib/cucumber/ast/outline_table.rb
View
25 lib/cucumber/ast/outline_table.rb
@@ -33,7 +33,7 @@ def accept(visitor)
def accept_hook?(hook)
@scenario_outline.accept_hook?(hook)
end
-
+
def source_tags
@scenario_outline.source_tags
end
@@ -52,7 +52,7 @@ def create_step_invocations_for_example_rows!(scenario_outline)
cells.create_step_invocations!(scenario_outline)
end
end
-
+
def example_rows
cells_rows[1..-1]
end
@@ -65,20 +65,25 @@ def language
@scenario_outline.language
end
- class ExampleRow < Cells #:nodoc:
+ class ExampleRow < Cells #:nodoc:
class InvalidForHeaderRowError < NoMethodError
def initialize(*args)
super 'This is a header row and cannot pass or fail'
end
end
-
+
attr_reader :scenario_outline # https://rspec.lighthouseapp.com/projects/16211/tickets/342
def initialize(table, cells)
super
@scenario_exception = nil
end
-
+
+ def source_tag_names
+ warn("Deprecated: please use #source_tags instead.")
+ source_tags.map { |tag| tag.name }
+ end
+
def source_tags
@table.source_tags
end
@@ -87,7 +92,7 @@ def create_step_invocations!(scenario_outline)
@scenario_outline = scenario_outline
@step_invocations = scenario_outline.step_invocations(self)
end
-
+
def skip_invoke!
@step_invocations.each do |step_invocation|
step_invocation.skip_invoke!
@@ -115,7 +120,7 @@ def accept_plain(visitor)
@cells.each do |cell|
visitor.visit_table_cell(cell)
end
-
+
visitor.visit_exception(@scenario_exception, :failed) if @scenario_exception
end
end
@@ -138,15 +143,15 @@ def accept_expand(visitor)
def accept_hook?(hook)
@table.accept_hook?(hook)
end
-
+
def exception
@exception || @scenario_exception
end
-
+
def fail!(exception)
@scenario_exception = exception
end
-
+
# Returns true if one or more steps failed
def failed?
raise InvalidForHeaderRowError if header?
Something went wrong with that request. Please try again.