Sha256: 54aeb36002aaa8228514e8aeecabefb9080dcb30c99a69408682600761113db2

Contents?: true

Size: 719 Bytes

Versions: 11

Compression:

Stored size: 719 Bytes

Contents

require File.expand_path(File.join(File.dirname(__FILE__), %w[.. .. spec_helper]))

describe Ziya::Charts::Support::Link do
  before( :each ) do
    @comp = Ziya::Charts::Support::Link.new
    area1 = Ziya::Charts::Support::Area.new
    area1.x = 10
    area2 = Ziya::Charts::Support::Area.new
    area2.x = 20
    @comp.areas = [area1, area2]
  end
    
  it "should define the correct attribute methods" do
    lambda{ Ziya::Charts::Support::Link.attributes[@comp.class.name].each {
     |m| @comp.send( m ) } }.should_not raise_error
  end
    
  it "should flatten component correctly" do
    xml = Builder::XmlMarkup.new
    @comp.flatten( xml ).should == "<link><area x=\"10\"/><area x=\"20\"/></link>"
  end
end

Version data entries

11 entries across 11 versions & 2 rubygems

Version Path
derailed-ziya-2.1.0 spec/charts/support/link_spec.rb
derailed-ziya-2.1.1 spec/charts/support/link_spec.rb
derailed-ziya-2.1.2 spec/charts/support/link_spec.rb
derailed-ziya-2.1.3 spec/charts/support/link_spec.rb
derailed-ziya-2.1.4 spec/charts/support/link_spec.rb
derailed-ziya-2.1.5 spec/charts/support/link_spec.rb
ziya-2.3.0 spec/charts/support/link_spec.rb
ziya-2.1.9 spec/charts/support/link_spec.rb
ziya-2.1.8 spec/charts/support/link_spec.rb
ziya-2.1.7 spec/charts/support/link_spec.rb
ziya-2.1.6 spec/charts/support/link_spec.rb