Sha256: 55fef9158e381b2dbadc11e027dcb518e2770e33c6b53396759b35eea9c3df37
Contents?: true
Size: 1.06 KB
Versions: 2
Compression:
Stored size: 1.06 KB
Contents
describe "Walt::TextAsset" do describe "#view" do describe "with attributes hash" do it "should work" do @asset = Walt::TextAsset.new(attributes: {font: {name: "MarkerFelt-Thin", size: 24}, color: "blue", shadow_color: "red", shadow_offset: {x: 10, y: 20}}) @asset.view.font.should == UIFont.fontWithName("MarkerFelt-Thin", size:24) @asset.view.textColor.should == UIColor.blueColor @asset.view.shadowColor.should == UIColor.redColor @asset.view.shadowOffset.should == CGSizeMake(10, 20) end end describe "without attributes hash" do it "should work" do @asset = Walt::TextAsset.new(text: "Hello World", text_color: "blue", "background_color" => "red", number_of_lines: 5, text_alignment: "center") @asset.view.text.should == "Hello World" @asset.view.textColor.should == UIColor.blueColor @asset.view.backgroundColor.should == UIColor.redColor @asset.view.numberOfLines.should == 5 @asset.view.textAlignment.should == UITextAlignmentCenter end end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
walt-0.1.2 | spec/asset/text_spec.rb |
walt-0.1 | spec/asset/text_spec.rb |