From a926c0519003472b08e99c6e70047899adcbb4c3 Mon Sep 17 00:00:00 2001 From: Alex Slynko Date: Wed, 24 Sep 2014 22:53:32 +0100 Subject: [PATCH] Support for cucumber 1.3.0 and higher --- Gemfile | 4 ++-- guard-cucumber.gemspec | 2 +- lib/guard/cucumber/notification_formatter.rb | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Gemfile b/Gemfile index 5605a0e..577d3d7 100644 --- a/Gemfile +++ b/Gemfile @@ -3,7 +3,7 @@ source "https://rubygems.org" gemspec gem 'rake' -gem 'rspec' +gem 'rspec', '~> 2.14' # The development group will no be # installed on Travis CI. @@ -18,4 +18,4 @@ platforms :rbx do gem 'racc' gem 'rubysl', '~> 2.0' gem 'psych' -end \ No newline at end of file +end diff --git a/guard-cucumber.gemspec b/guard-cucumber.gemspec index 09bb61c..ce7ab1a 100644 --- a/guard-cucumber.gemspec +++ b/guard-cucumber.gemspec @@ -16,7 +16,7 @@ Gem::Specification.new do |s| s.rubyforge_project = 'guard-cucumber' s.add_dependency 'guard', '>= 1.1.0' - s.add_dependency 'cucumber', '>= 1.2.0' + s.add_dependency 'cucumber', '>= 1.3.0' s.add_development_dependency 'bundler', '~> 1.1' diff --git a/lib/guard/cucumber/notification_formatter.rb b/lib/guard/cucumber/notification_formatter.rb index 36eec8a..bcb4a0d 100644 --- a/lib/guard/cucumber/notification_formatter.rb +++ b/lib/guard/cucumber/notification_formatter.rb @@ -53,7 +53,7 @@ def before_feature_element(feature_element) # def after_feature_element(feature_element) if @rerun - @file_names << feature_element.file_colon_line + @file_names << feature_element.location.to_s @rerun = false end end @@ -67,7 +67,7 @@ def after_feature_element(feature_element) # @param [Cucumber::Ast::Background] background the feature background # @param [String] file name and line number describing where the step is used # - def step_name(keyword, step_match, status, source_indent, background, file_colon_line) + def step_name(keyword, step_match, status, source_indent, background, location) if [:failed, :pending, :undefined].index(status) @rerun = true step_name = step_match.format_args(lambda { |param| "*#{ param }*" })