Backfilling test coverage

This commit is contained in:
David Larrabee
2014-12-09 08:47:52 -05:00
parent 6803af8c45
commit 9cf1707ccc
2 changed files with 52 additions and 8 deletions

View File

@@ -181,10 +181,9 @@ describe 'RubyMotionQuery ext' do
@view.text.should.equal("test style")
end
end
describe "color" do
before do
@view = UIView.alloc.init
end
before { @view = UIView.alloc.init }
it "should return rmq.color" do
@view.color.should.equal(RubyMotionQuery::Color)
@@ -192,14 +191,38 @@ describe 'RubyMotionQuery ext' do
end
describe "font" do
before do
@view = UIView.alloc.init
end
before { @view = UIView.alloc.init }
it "should return rmq.font" do
@view.font.should.equal(RubyMotionQuery::Font)
end
end
describe "image" do
before { @view = UIView.alloc.init }
it "should return rmq.image" do
@view.image.should.equal(RubyMotionQuery::ImageUtils)
end
end
describe "stylesheet" do
before { @view = UIView.alloc.init }
it "should return rmq.stylesheet" do
@view.stylesheet.should.equal(@view.rmq.stylesheet)
end
end
describe "stylesheet=" do
before { @view = UIView.alloc.init }
class FakeStylesheetForTest;end
it "should set rmq.stylesheet" do
@view.stylesheet = FakeStylesheetForTest
@view.rmq.stylesheet.is_a?(FakeStylesheetForTest).should.be.true
end
end
end
describe "Promotion::Screen" do
@@ -312,6 +335,7 @@ describe 'RubyMotionQuery ext' do
@view.text.should.equal('style from sheet')
end
end
describe "color" do
it "should return rmq.color" do
@screen.color.should.equal(RubyMotionQuery::Color)
@@ -323,6 +347,26 @@ describe 'RubyMotionQuery ext' do
@screen.font.should.equal(RubyMotionQuery::Font)
end
end
describe "image" do
it "should return rmq.image" do
@screen.image.should.equal(RubyMotionQuery::ImageUtils)
end
end
describe "stylesheet" do
it "should return rmq.stylesheet" do
@screen.stylesheet.should.equal(@screen.rmq.stylesheet)
end
end
describe "stylesheet=" do
class FakeStylesheetForTest;end
it "should set rmq.stylesheet" do
@screen.stylesheet = FakeStylesheetForTest
@screen.rmq.stylesheet.is_a?(FakeStylesheetForTest).should.be.true
end
end
end
end
class TestView < UIView