Added an orphan test I had added a while ago. Bumped version and built gem

This commit is contained in:
Todd Werth
2015-01-23 11:12:58 -08:00
parent dcf7070aa4
commit d1a7618da4
3 changed files with 17 additions and 3 deletions

View File

@@ -1,7 +1,7 @@
PATH
remote: .
specs:
ruby_motion_query (1.0.0)
ruby_motion_query (1.1.0)
GEM
remote: https://rubygems.org/

View File

@@ -1,5 +1,5 @@
module RubyMotionQuery
VERSION = "1.0.0"
VERSION = "1.1.0"
class RMQ
def version

View File

@@ -49,6 +49,16 @@ describe 'stylesheet' do
@vc.rmq.stylesheet.setup_called.should.be.true
end
it 'should allow stylesheet to be changed and styles reapplied' do
@vc.rmq.stylesheet = StyleSheetForStylesheetTests
q_one = @vc.rmq.append(UIView, :style_one)
q_full = q_one.append(UIView, :style_full)
@vc.rmq(:style_full).frame.width.should == 16
@vc.rmq.stylesheet = StyleSheetForStylesheetTests
@vc.rmq.all.reapply_styles
@vc.rmq(:style_full).frame.width.should == 16
end
describe 'getting app and screen size, width, and height' do
before do
@screen = rmq.device.screen
@@ -303,7 +313,7 @@ class StyleSheetForStylesheetTests < RubyMotionQuery::Stylesheet
end
def style_one(st)
st.frame = {l: 1}
st.frame = {l: 1, w: 16}
st.background_color = color.battleship_gray
end
@@ -324,6 +334,10 @@ class StyleSheetForStylesheetTests < RubyMotionQuery::Stylesheet
rmq(st.view).get.textColor = color.blue
end
def style_full(st)
st.frame = :full if st.view.superview
end
def digits_field(st)
st.validation_errors = {
digits: "custom error messsage"