Sha256: 7309b28ed4474bb2088fe87c7aa1e762365c28f9a7f64200f4a2150a4731ca87
Contents?: true
Size: 443 Bytes
Versions: 3
Compression:
Stored size: 443 Bytes
Contents
require 'spec_helper' describe 'Dependor::Constructor' do class SampleClassUsingConstructor include Dependor::Constructor(:foo, :bar, :baz) def as_instance_variables {foo: @foo, bar: @bar, baz: @baz} end end it 'defines a constructor with given parameters' do sample = SampleClassUsingConstructor.new('aaa', 'bbb', 'ccc') sample.as_instance_variables.should == {foo: 'aaa', bar: 'bbb', baz: 'ccc'} end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
dependor-1.0.1 | spec/dependor/constructor_spec.rb |
dependor-1.0.0 | spec/dependor/constructor_spec.rb |
dependor-0.0.6 | spec/dependor/constructor_spec.rb |