Sha256: 38292b8a40bd4cd6d99d9391cdcc766925317d03e213bcb8709b68a17a3b694c
Contents?: true
Size: 1.09 KB
Versions: 2
Compression:
Stored size: 1.09 KB
Contents
require File.expand_path(File.join(File.dirname(__FILE__), %w[.. .. spec_helper])) describe Ziya::Charts::Support::ChartPref do before( :each ) do @comp = Ziya::Charts::Support::ChartPref.new end it "should define the correct attribute methods" do lambda{ Ziya::Charts::Support::ChartPref.attributes[@comp.class.name].each { |m| @comp.send( m ) } }.should_not raise_error end describe "#flatten" do before( :each ) do @xml = Builder::XmlMarkup.new end it "should flatten line point shape correctly" do @comp.point_shape = "square" @comp.flatten( @xml ).should == '<chart_pref point_shape="square"/>' end it "should flatten line connect correctly" do @comp.connect = true @comp.point_shape = 'square' @comp.flatten( @xml ).should == '<chart_pref point_shape="square" connect="true"/>' end it "should flatten zero line correctly" do @comp.zero_line = true @comp.point_shape = 'square' @comp.flatten( @xml ).should == '<chart_pref point_shape="square" zero_line="true"/>' end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
ziya-2.1.7 | spec/charts/support/chart_pref_spec.rb |
ziya-2.1.6 | spec/charts/support/chart_pref_spec.rb |