Sha256: 42e1669ea6a3100925c51c511489bb054dc5bb8231a78dc566c5e3ec0ec893ee
Contents?: true
Size: 1.06 KB
Versions: 4
Compression:
Stored size: 1.06 KB
Contents
require 'amcharts/chart' describe AmCharts::Chart do describe "#dimensions" do context "setting width and height with the same assignment" do before { subject.dimensions = "800x600" } its(:width) { should == 800 } its(:height) { should == 600 } end context "not setting width and height" do its(:width) { should be_nil } its(:height) { should be_nil } end end describe "#new" do it "should add settings from the given block" do chart = described_class.new do |c| c.foo = :bar end chart.settings[:foo].should == :bar end end describe "#update_settings" do subject do described_class.new do |c| c.foo = :bar end end it "should add new settings" do subject.update_settings { |c| c.baz = :quux } subject.settings[:foo].should == :bar subject.settings[:baz].should == :quux end it "should override existing settings" do subject.update_settings { |c| c.foo = :baz } subject.settings[:foo].should == :baz end end end
Version data entries
4 entries across 4 versions & 1 rubygems
Version | Path |
---|---|
amcharts.rb-3.4.7.4 | spec/chart_spec.rb |
amcharts.rb-3.4.7.3 | spec/chart_spec.rb |
amcharts.rb-3.4.7.2 | spec/chart_spec.rb |
amcharts.rb-3.4.7.1 | spec/chart_spec.rb |