Sha256: 248ac1d3079b1bac00ee060023e30438fe22e7e7973e01567f5bd820b55aaf3e
Contents?: true
Size: 822 Bytes
Versions: 13
Compression:
Stored size: 822 Bytes
Contents
require 'spec_helper' describe Virtus::Attribute, '#public_writer?' do subject { object.public_writer? } let(:object) { described_class.new(:name, options) } let(:options) { { :primitive => primitive, :coercion_method => coercion_method } } let(:primitive) { stub('primitive') } let(:coercion_method) { stub('coercion_method') } context 'when :writer is not not specified' do it { should be(true) } end { :public => true, :protected => false, :private => false }.each do |value, expected| context "when :writer is #{value.inspect}" do before do options.update(:writer => value) end it { should be(expected) } end end end
Version data entries
13 entries across 13 versions & 2 rubygems