Closed holgersindbaek closed 11 years ago
It was because of the 'height: "100%-20"' that I had in my stylesheet. Now I go this instead 'Device.screen.height-20'. Might not be an optimal solution, but it's working.
Glad you got it resolved! Another way to resolve this is to define your controller inside another controller by defining a controller
method in your test, and instantiating your controller in there, e.g.
describe MyController
tests MyController
def controller
ctlr = MyController.new
nav = UINavigationController.alloc.initWithRootViewController(ctlr)
return ctlr
end
# ...
end
I would like to test my controllers and views, but I'm having problems with Teacup.
If I do as it is written in the Rubymotion's guide - http://www.rubymotion.com/developer-center/articles/testing/ - and stop the app from launching fully:
Then I get an error when it loads the specific view. It can't calculate the width and height (100%), since it's not inside another view controller.
What can I do about that? Anyone who's been in the same situation?