mirror of
https://github.com/zhigang1992/rmq.git
synced 2026-01-12 17:52:17 +08:00
Added an orphan test I had added a while ago. Bumped version and built gem
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
PATH
|
||||
remote: .
|
||||
specs:
|
||||
ruby_motion_query (1.0.0)
|
||||
ruby_motion_query (1.1.0)
|
||||
|
||||
GEM
|
||||
remote: https://rubygems.org/
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
module RubyMotionQuery
|
||||
VERSION = "1.0.0"
|
||||
VERSION = "1.1.0"
|
||||
|
||||
class RMQ
|
||||
def version
|
||||
|
||||
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user