Sha256: 5d9d8c2a9ecb82af55837ff351836792823ce8218e3c5c2056815b460399b6e1
Contents?: true
Size: 1.41 KB
Versions: 13
Compression:
Stored size: 1.41 KB
Contents
describe MotionPrime::Section do describe "general" do before do @section = SampleSection.new(screen: @screen) end describe "#name" do it "should use class name by default" do @section.name.should == 'sample' end it "should use given name" do section = SampleSection.new(name: 'my_section') section.name.should == 'my_section' end end end describe "base section" do before do @screen = BaseScreen.new @section = SampleViewSection.new(screen: @screen) @section.render end describe "#element" do it "should return element by name" do @section.element(:description).is_a?(MotionPrime::BaseElement).should.be.true end end describe "#view" do it "should return view by element name" do @section.view(:description).is_a?(MPLabel).should.be.true end end end describe "draw section" do before do @screen = BaseScreen.new @section = SampleDrawSection.new(screen: @screen) @section.render end describe "#element" do it "should return element by name" do @section.element(:description).is_a?(MotionPrime::DrawElement).should.be.true end end describe "#view" do it "should return container view by element name" do @section.view(:description).is_a?(MPViewWithSection).should.be.true end end end end
Version data entries
13 entries across 13 versions & 1 rubygems