Skip to content

Instantly share code, notes, and snippets.

@fidothe
Created April 8, 2013 08:50
Show Gist options
  • Save fidothe/5335286 to your computer and use it in GitHub Desktop.
Save fidothe/5335286 to your computer and use it in GitHub Desktop.
Illustrating problem with VCR 2.4.0 and Cucumber 1.2.4. Run with `bundle exec cucumber .`
Feature: Cucumber / VCR interaction bug
Cucumber 1.2.4 seems to have changed an API VCR 2.4.0 relies on
@vcr
Scenario: explosion
When I make an http request
source "http://rubygems.org/"
gem 'vcr', '2.4.0'
gem 'cucumber', '1.2.4'
gem 'webmock', '1.11.0'
require 'vcr'
VCR.configure do |c|
c.hook_into :webmock
c.cassette_library_dir = 'vcr_cassettes'
end
VCR.cucumber_tags do |t|
t.tag '@vcr', :use_scenario_name => true
end
@fidothe
Copy link
Author

fidothe commented Apr 8, 2013

The result is:

undefined method `feature' for #<Cucumber::Ast::Scenario:0x007fea624ea3f0> (NoMethodError)
 /Users/matt/.rbenv/versions/1.9.3-p392/lib/ruby/gems/1.9.1/gems/vcr-2.4.0/lib/vcr/test_frameworks/cucumber.rb:43:in `Before'

The omission of a step defnition is deliberate: the error happens with or without it...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment