Sha256: ee00bee9c4d54c518862cf32176c058dd70a804b96d5f238d79e8972524afe38
Contents?: true
Size: 1.19 KB
Versions: 15
Compression:
Stored size: 1.19 KB
Contents
require 'spec_helper' describe Gurke::FeatureList do let(:reporter) { Gurke::Reporters::NullReporter.new } let(:runner) { double 'runner' } let(:feature) { double 'feature' } before do features << feature allow(runner).to receive(:hook) {|_, _, &block| block.call } allow(feature).to receive(:failed?).and_return false allow(feature).to receive(:pending?).and_return false allow(feature).to receive(:run) end let(:features) { Gurke::FeatureList.new } describe '#run' do subject { features.run runner, reporter } it 'should run all features' do expect(feature).to receive(:run).with(runner, reporter) subject end it 'should run hooks' do expect(runner).to receive(:hook) do |scope, world| expect(scope).to eq :features expect(world).to eq nil end subject end it 'should run reporter callbacks in correct order' do expect(reporter).to receive(:invoke).exactly(4).times do |*args| @scopes ||= [] @scopes << args.first end subject expect(@scopes).to eq [:before_features, :start_features, :end_features, :after_features] end end end
Version data entries
15 entries across 15 versions & 1 rubygems