Sha256: 62cffc1388ca2207dbfe63d725c01903e323c589c8fe532c2e036abc8fed9beb
Contents?: true
Size: 1.28 KB
Versions: 14
Compression:
Stored size: 1.28 KB
Contents
shared_context 'mock + strong' do include MockDefinitionCreatorHelpers 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 mocking' 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 mocking' 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