Sha256: ae607dd326fbfb10473a501cf95a3de34e017e924b5187077de6187f6d9fbfcf
Contents?: true
Size: 823 Bytes
Versions: 6
Compression:
Stored size: 823 Bytes
Contents
describe UnderOs::UI::Image do describe '#initialize' do before do @image = UnderOs::UI::Image.new(src: 'test.png') end it "should say it has the 'IMG' tag name" do @image.tagName.should == 'IMG' end it "should extract and assign the image source" do @image._.image.class.should == UIImage end end describe '#src' do before do @image = UnderOs::UI::Image.new end it "should be nil" do @image.src.should == nil end it "should allow to specify the source as a file name" do @image.src = 'test.png' @image.src.class.should == UIImage end it "should allow to specify the source as an UIImage object" do src = UIImage.imageNamed('test.png') @image.src = src @image.src.should == src end end end
Version data entries
6 entries across 6 versions & 2 rubygems