Sha256: df699263332160ce3371d7c3bc6228359e987ab006d5c659bd6b467a35710631
Contents?: true
Size: 1.28 KB
Versions: 14
Compression:
Stored size: 1.28 KB
Contents
shared_context 'stub + strong' do include StubDefinitionCreatorHelpers context 'against instance methods', method_type: :instance do context 'that exist', methods_exist: true do include_context 'tests for a double definition creator method that supports stubbing' it_behaves_like 'comparing the arity between the method and double definition' end context 'that do not exist', methods_exist: false do it "doesn't work" do object = Object.new double_creator = double_definition_creator_for(object) expect { double_creator.some_method }.to \ raise_error(RR::Errors::SubjectDoesNotImplementMethodError) end end end context 'against class methods', method_type: :class do context 'that exist', methods_exist: true do include_context 'tests for a double definition creator method that supports stubbing' it_behaves_like 'comparing the arity between the method and double definition' end context 'that do not exist', methods_exist: false do it "doesn't work" do klass = Class.new double_creator = double_definition_creator_for(klass) expect { double_creator.some_method }.to \ raise_error(RR::Errors::SubjectDoesNotImplementMethodError) end end end end
Version data entries
14 entries across 14 versions & 1 rubygems