Sha256: 342111117134c7fe2284f4d21a4736a366eeabcec1b5754fbc218330ded5a79c
Contents?: true
Size: 1.01 KB
Versions: 1
Compression:
Stored size: 1.01 KB
Contents
require 'spec_helper' module CiteProc describe Attributes do before(:each) { Object.instance_eval { include Attributes } } let(:instance) { o = Object.new } let(:other) { o = Object.new; o.attributes[:foo] = 'bar'; o } it { should_not be_nil } describe '.attr_fields' do # before(:all) { class Object; attr_fields :value, %w[ is-numeric punctuation-mode ]; end } it 'generates setters for attr_field values' do # pending # lambda { Object.new.is_numeric }.should_not raise_error end it 'generates no other setters' do lambda { Object.new.some_other_value }.should raise_error end end describe '#merge' do it 'merges non-existent values from other object' do Object.new.merge(other).attributes[:foo].should == 'bar' end # it 'does not overwrite existing values when merging other object' do # instance.merge(other)['foo'].should == 'bar' # end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
citeproc-0.0.2 | spec/citeproc/attributes_spec.rb |