spec/layout_grid_spec.rb in rubyvis-0.6.1 vs spec/layout_grid_spec.rb in rubyvis-0.7.0
- old
+ new
@@ -1,14 +1,14 @@
require File.expand_path(File.dirname(__FILE__)+"/spec_helper.rb")
describe Rubyvis::Layout::Grid do
include Rubyvis::LayoutSpec
it "should have correct properties" do
- props=[:antialias, :bottom, :canvas, :cols, :cursor, :data, :events, :fill_style, :height, :id, :left, :line_width, :overflow, :reverse, :right, :rows, :stroke_style, :title, :top, :transform, :visible, :width].inject({}) {|ac, v| ac[v]=true; ac}
+ props=[:antialias, :bottom, :canvas, :cols, :cursor, :data, :events, :fill_style, :height, :id, :left, :line_width, :overflow, :reverse, :right, :rows, :stroke_style, :title, :top, :transform, :visible, :view_box, :width].inject({}) {|ac, v| ac[v]=true; ac}
Rubyvis::Layout::Grid.properties.should==props
end
it "Rubyvis.Layout.Grid be the same as Rubyvis::Layout::Grid" do
- Rubyvis.Layout.Grid.should eql Rubyvis::Layout::Grid
+ expect(Rubyvis.Layout.Grid).to eql Rubyvis::Layout::Grid
end
it "should render equal to protovis 'layout_grid.html' test" do
vis = pv.Panel.new().
data(["A"]).
@@ -28,13 +28,13 @@
stroke_style("#fff").
anchor("center").add(Rubyvis::Label).
textStyle("rgba(255, 255, 255, .4)").
font("24px sans");
-vis.render();
+ vis.render
pv_out=fixture_svg_read("layout_grid.svg")
- vis.to_svg.should have_same_svg_elements(pv_out)
+ expect(vis.to_svg).to have_same_svg_elements(pv_out)
end
-end
\ No newline at end of file
+end