Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Cucumber's features now pass on 1.8.6, 1.8.7 and 1.9.1

  • Loading branch information...
commit 564362be0c3a28aa76f1510683dedaa84f1ed9be 1 parent 3b9c3d6
@aslakhellesoy aslakhellesoy authored
View
1  History.txt
@@ -1,6 +1,7 @@
== 0.4.x
=== Bugfixes
+* Cucumber's features now pass on 1.8.6, 1.8.7 and 1.9.1. (Aslak Hellesøy)
* Ensure no errors are raised when limiting with tags which are not in the feature set (#464 Joseph Wilk)
== 0.4.0 2009-10-09
View
12 README.txt
@@ -2,3 +2,15 @@
The main website is at http://cukes.info/
The documentation is at http://github.com/aslakhellesoy/cucumber/wikis/home/
+
+== Running tests
+
+gem install geminstaller
+geminstaller
+gem install test-unit # Only do this if you're on Ruby 1.9.1. Might not be needed when a new version of Spork is released.
+rake
+
+Note that if you're on Ruby 1.9.1, the RSpec suite will fail because
+RSpec doesn' work with Ruby 1.9.1 yet. You can run only the features:
+
+rake cucumber
View
2  features/post_configuration_hook.feature
@@ -26,7 +26,7 @@ Feature: Post Configuration Hook [#423]
And a file named "features/support/env.rb" with:
"""
AfterConfiguration do |config|
- config.out_stream << "AfterConfiguration hook read feature directories: #{config.feature_dirs}"
+ config.out_stream << "AfterConfiguration hook read feature directories: #{config.feature_dirs.join(', ')}"
end
"""
When I run cucumber features
View
6 features/support/env.rb
@@ -39,13 +39,17 @@ def initialize
# The last standard out, with the duration line taken out (unpredictable)
def last_stdout
- strip_duration(@last_stdout)
+ strip_1_9_paths(strip_duration(@last_stdout))
end
def strip_duration(s)
s.gsub(/^\d+m\d+\.\d+s\n/m, "")
end
+ def strip_1_9_paths(s)
+ s.gsub(/#{Dir.pwd}\/examples\/self_test\/tmp/m, ".").gsub(/#{Dir.pwd}\/examples\/self_test/m, ".")
+ end
+
def replace_duration(s, replacement)
s.gsub(/\d+m\d+\.\d+s/m, replacement)
end
View
2  features/transform.feature
@@ -38,7 +38,7 @@ Feature: transform
end
Transform /^'(\d+)' to a Float$/ do |integer_string|
- Float.induced_from Transform("'#{integer_string}' to an Integer")
+ Transform("'#{integer_string}' to an Integer").to_f
end
Transform(/^('\w+') to Nil$/) {|str| nil }
View
25 geminstaller.yml
@@ -0,0 +1,25 @@
+defaults:
+ install_options: "--no-ri --no-rdoc"
+gems:
+- name: builder
+ version: '2.1.2'
+- name: diff-lcs
+ version: '1.1.2'
+- name: hoe
+ version: '2.3.3'
+- name: hoe
+ version: '2.3.3'
+- name: nokogiri
+ version: '1.3.3'
+- name: prawn
+ version: '0.5.1'
+- name: rspec
+ version: '1.2.9'
+- name: sdoc
+ version: '0.2.14.1'
+- name: spork
+ version: '0.7.2'
+- name: term-ansicolor
+ version: '1.0.4'
+- name: treetop
+ version: '1.4.2'
View
3  lib/cucumber/ast/step_invocation.rb
@@ -105,6 +105,9 @@ def failed(options, e, clear_backtrace)
def filter_backtrace(e)
return e if Cucumber.use_full_backtrace
+ pwd = /#{Dir.pwd}\//m
+ (e.backtrace || []).each{|line| line.gsub!(pwd, "./")}
+
filtered = (e.backtrace || []).reject do |line|
BACKTRACE_FILTER_PATTERNS.detect { |p| line =~ p }
end
View
1  lib/cucumber/core_ext/proc.rb
@@ -13,6 +13,7 @@ def backtrace_line(name)
if Proc.new{}.to_s =~ PROC_PATTERN
def file_colon_line
path, line = *to_s.match(PROC_PATTERN)[1..2]
+ line = line.to_i - 1 if Cucumber::RUBY_1_9
path = File.expand_path(path)
pwd = Dir.pwd
path = path[pwd.length+1..-1]
Please sign in to comment.
Something went wrong with that request. Please try again.