Sha256: bc4af953e6ee4a60bee871820e5eb780e0d16e73967b6f84a8a5b8d477900b80
Contents?: true
Size: 639 Bytes
Versions: 1
Compression:
Stored size: 639 Bytes
Contents
# encoding: utf-8 require 'spec_helper' describe AbstractType::ClassMethods, '#abstract_method' do subject { object.some_method } let(:abstract_type) do Class.new do include AbstractType abstract_method :some_method end end let(:class_under_test) do Class.new(abstract_type) end before do TheClassName = class_under_test end after do Object.class_eval { remove_const(:TheClassName) } end let(:object) { class_under_test.new } it 'creates an abstract method' do expect { subject }.to raise_error(NotImplementedError,'TheClassName#some_method is not implemented') end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
abstract_type-0.0.2 | spec/unit/abstract_type/class_methods/abstract_method_spec.rb |