spec/vcr/test_frameworks/cucumber_spec.rb in vcr-2.5.0 vs spec/vcr/test_frameworks/cucumber_spec.rb in vcr-2.6.0

- old
+ new

@@ -4,11 +4,11 @@ subject { described_class.new(self) } let(:before_blocks_for_tags) { {} } let(:after_blocks_for_tags) { {} } def scenario(name) - stub(:name => name, :feature => stub(:name => "My feature name\nThe preamble text is not included")) + double(:name => name, :feature => double(:name => "My feature name\nThe preamble text is not included"), :failed? => false) end let(:current_scenario) { scenario "My scenario name\nThe preamble text is not included" } # define our own Before/After so we can test this in isolation from cucumber's implementation. @@ -62,19 +62,19 @@ end it "makes a unique name for each element of scenario outline" do subject.send(tag_method, 'tag1', :use_scenario_name => true) - scenario_with_outline = stub(:name => "My row name", - :scenario_outline => stub(:feature => stub(:name => "My feature name\nThe preamble text is not included"), + scenario_with_outline = double(:name => "My row name", :failed? => false, + :scenario_outline => double(:feature => double(:name => "My feature name\nThe preamble text is not included"), :name => "My scenario outline name")) test_tag(:name, 'tag1', 'My feature name/My scenario outline name/My row name', scenario_with_outline) end it 'does not pass :use_scenario_name along the given options to the cassette' do subject.send(tag_method, 'tag1', :use_scenario_name => true) - VCR::Cassette.should_receive(:new).with(anything, hash_not_including(:use_scenario_name)) + expect(VCR::Cassette).to receive(:new).with(anything, hash_not_including(:use_scenario_name)) before_blocks_for_tags['tag1'].call(current_scenario) end it 'does not modify the options passed to the cassette' do original_options = { :use_scenario_name => true, :record => :none }