Sha256: cb99d7f83eae04c6cd8da396223f63d3b72ae70a723cc59863f1752234e16df5
Contents?: true
Size: 724 Bytes
Versions: 1
Compression:
Stored size: 724 Bytes
Contents
require File.expand_path(File.dirname(__FILE__) + '/../spec_helper') class TestInitializableWithInitializer include SecurityGuard::Concerns::Initializable initializable :attr1, :attr2 def initialize(args) initializable_attrs args end end class TestInitializableWithoutInitializer include SecurityGuard::Concerns::Initializable initializable :attr1, :attr2 end describe SecurityGuard::Concerns::Initializable do [TestInitializableWithInitializer, TestInitializableWithoutInitializer].each do |klass| it "#{klass}: initialises with some attributes" do test = klass.new :attr1 => 'test1', :attr2 => 'test2' test.attr1.must_equal 'test1' test.attr2.must_equal 'test2' end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
security_guard-0.0.3 | specs/concerns/initializable_spec.rb |