Sha256: 0f4297c7688558fcd9e36010f4f8719e21979bc9b50b95b7b6b30eeb1c896498
Contents?: true
Size: 1.02 KB
Versions: 1
Compression:
Stored size: 1.02 KB
Contents
require_relative '../spec_helper' describe 'Mark' do subject { ::Plotrb::Mark.rect } describe '#initialize' do context 'when type is group' do subject { ::Plotrb::Mark.group } it 'has additional scales, axes, and marks attribute' do subject.attributes.should include(:scales, :axes, :marks) end end end describe 'properties' do it 'allows multiple properties' do ::Plotrb::Kernel.stub(:find_data).with('some_data').and_return(true) subject.from('some_data') subject.enter subject.exit subject.properties.keys.should match_array([:enter, :exit]) end end describe '#from' do it 'recognizes Data and Transform objects' do foo = ::Plotrb::Transform.facet bar = ::Plotrb::Transform.filter ::Plotrb::Kernel.stub(:find_data).with('some_data').and_return(true) subject.from('some_data', foo, bar) subject.send(:process_from) subject.from.should == {:data => 'some_data', :transform => [foo, bar]} end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
plotrb-0.0.1 | spec/plotrb/marks_spec.rb |