spec/vcr/test_frameworks/cucumber_spec.rb in vcr-2.4.0 vs spec/vcr/test_frameworks/cucumber_spec.rb in vcr-2.5.0
- old
+ new
@@ -19,17 +19,17 @@
def After(tag, &block)
after_blocks_for_tags[tag.sub('@', '')] = block
end
def test_tag(cassette_attribute, tag, expected_value, scenario=current_scenario)
- VCR.current_cassette.should be_nil
+ expect(VCR.current_cassette).to be_nil
before_blocks_for_tags[tag].call(scenario)
- VCR.current_cassette.send(cassette_attribute).should eq(expected_value)
+ expect(VCR.current_cassette.send(cassette_attribute)).to eq(expected_value)
after_blocks_for_tags[tag].call(scenario)
- VCR.current_cassette.should be_nil
+ expect(VCR.current_cassette).to be_nil
end
%w(tags tag).each do |tag_method|
describe "##{tag_method}" do
it "creates a cucumber Around hook for each given tag so that the scenario runs with the cassette inserted" do
@@ -80,13 +80,13 @@
it 'does not modify the options passed to the cassette' do
original_options = { :use_scenario_name => true, :record => :none }
subject.send(tag_method, 'tag1', original_options)
before_blocks_for_tags['tag1'].call(current_scenario)
- original_options.should have(2).items
- original_options[:use_scenario_name].should eq(true)
- original_options[:record].should eq(:none)
+ expect(original_options).to have(2).items
+ expect(original_options[:use_scenario_name]).to eq(true)
+ expect(original_options[:record]).to eq(:none)
end
it "works properly when multiple scenarios use the tag" do
subject.send(tag_method, 'tag1', :use_scenario_name => true)
@@ -99,9 +99,9 @@
describe '.tags' do
it 'returns the list of cucumber tags' do
subject.tags 'tag1', 'tag2'
subject.tags 'tag3', 'tag4'
- described_class.tags[-4, 4].should eq(%w(@tag1 @tag2 @tag3 @tag4))
+ expect(described_class.tags[-4, 4]).to eq(%w(@tag1 @tag2 @tag3 @tag4))
end
end
end