Sha256: f1802086e66c8db5763f9e42683cfd6cc25faba3d542850f75e9e6f7149b55dd

Contents?: true

Size: 1019 Bytes

Versions: 1

Compression:

Stored size: 1019 Bytes

Contents

require_relative '../spec_helper'

describe 'Kernel' do

  class Object
    include ::Plotrb::Kernel
  end

  describe '#visualization' do

    it 'creates new visualization object' do
      v = visualization
      v.is_a?(::Plotrb::Visualization).should be_true
    end

  end

  describe '#pdata' do

    it 'creates new data object' do
      d = pdata
      d.is_a?(::Plotrb::Data).should be_true
    end

  end

  describe '#method_missing' do

    it 'creates axis object' do
      a = x_axis
      a.is_a?(::Plotrb::Axis).should be_true
      a.type.should == :x
    end

    it 'creates scale object' do
      s = linear_scale
      s.is_a?(::Plotrb::Scale).should be_true
      s.type.should == :linear
    end

    it 'creates mark object' do
      m = rect_mark
      m.is_a?(::Plotrb::Mark).should be_true
      m.type.should == :rect
    end

    it 'creates transform object' do
      t = filter_transform
      t.is_a?(::Plotrb::Transform).should be_true
      t.type.should == :filter
    end
  end

end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
plotrb-0.0.1 spec/plotrb/kernel_spec.rb