Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Consistent backtrace accross MRI versions #383

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions cucumber.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@ end
wip_opts = "--color --tags @wip:3"
wip_opts << ",@wip-jruby:3" if defined?(JRUBY_VERSION)
%>
default: <%= std_opts %> --tags ~@jruby --dotcucumber features/.cucumber
jruby: <%= std_opts %> --tags ~@spork --tags ~@wire
jruby_win: <%= std_opts %> --tags ~@spork --tags ~@wire CUCUMBER_FORWARD_SLASH_PATHS=true
default: <%= std_opts %> --tags ~@jruby --dotcucumber features/.cucumber
jruby: <%= std_opts %> --tags ~@spork --tags ~@wire --tags ~@not-jruby
jruby_win: <%= std_opts %> --tags ~@spork --tags ~@wire --tags ~@not-jruby CUCUMBER_FORWARD_SLASH_PATHS=true
windows_mri: <%= std_opts %> --tags ~@jruby --tags ~@spork --tags ~@wire --tags ~@needs-many-fonts CUCUMBER_FORWARD_SLASH_PATHS=true
ruby_1_9: <%= std_opts %> --tags ~@jruby --tags ~@fails_on_1_9
ruby_2_0: <%= std_opts %> --tags ~@jruby --tags ~@fails_on_1_9
Expand Down
34 changes: 34 additions & 0 deletions features/backtraces.feature
Original file line number Diff line number Diff line change
Expand Up @@ -34,3 +34,37 @@ Feature: Backtraces
java.util.AbstractList.add(AbstractList.java:108)
"""

@not-jruby
Scenario: Ruby backtraces
Given a file named "game.rb" with:
"""
class Game
def start; end
end
"""
And a file named "features/start.feature" with:
"""
Feature:
Scenario:
When I start the game
"""
And a file named "features/step_definitions/steps.rb" with:
"""
require File.dirname(__FILE__) + '/../../game'
When /start/ do
Game.new.start('a spurious argument')
end
"""
When I run `cucumber`
Then it should fail with:
"""
Feature:

Scenario: # features/start.feature:2
When I start the game # features/step_definitions/steps.rb:2
wrong number of arguments (1 for 0) (ArgumentError)
./game.rb:2:in `start'
./features/step_definitions/steps.rb:3:in `/start/'
features/start.feature:3:in `When I start the game'
"""