Sha256: d3c094ca8fdd4588e4751e9751662da5ce490d89e36a6a0a53d96b7796081adf
Contents?: true
Size: 701 Bytes
Versions: 4
Compression:
Stored size: 701 Bytes
Contents
require 'spec_helper' describe WrapIt do describe 'self.register_module' do it 'registers existing module' do mod = Module.new expect(WrapIt.register_module(mod)).to eq mod end it 'makes anonymous module if no module specified' do expect(WrapIt.register_module).to be_kind_of Module end %i(register unregister).each do |method| it "adds `#{method}` method to module" do expect(WrapIt.register_module).to respond_to method end end it 'supports prefix for helpers' do mod = WrapIt.register_module prefix: 'test_' mod.register :method, Object expect(mod.instance_methods).to include :test_method end end end
Version data entries
4 entries across 4 versions & 1 rubygems
Version | Path |
---|---|
wrap_it-1.0.2 | spec/lib/helpers_spec.rb |
wrap_it-1.0.1 | spec/lib/helpers_spec.rb |
wrap_it-1.0.0 | spec/lib/helpers_spec.rb |
wrap_it-0.2.0 | spec/lib/helpers_spec.rb |