File: mark_spec.rb

package info (click to toggle)
ruby-rubyvis 0.6.1%2Bdfsg1-2
  • links: PTS, VCS
  • area: main
  • in suites: buster, stretch
  • size: 1,808 kB
  • ctags: 679
  • sloc: ruby: 11,114; makefile: 2
file content (20 lines) | stat: -rw-r--r-- 747 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
require File.expand_path(File.dirname(__FILE__)+"/spec_helper.rb")
describe Rubyvis::Mark do
  it "should have correct properties" do
    props=[:antialias, :bottom, :cursor, :data, :events, :id, :left, :reverse, :right, :title, :top, :visible].inject({}) {|ac, v| ac[v]=true; ac}
    Rubyvis::Mark.properties.should==props
  end
  it "should return correct defaults" do
    props=Rubyvis::Mark.defaults._properties.sort {|a,b| a.name.to_s<=>b.name.to_s}
    props[1].name.should==:data
    props[1].value.should be_instance_of Proc
    props[3].name.should==:visible
    props[0].name.should==:antialias
    props[2].name.should==:events
  end
  it "should have 'mark' as type" do
    m=Rubyvis::Mark.new
    m.type.should eql "mark"
  end
  
end