Fixed find to match rmq in UIView and UIViewController

This commit is contained in:
Todd Werth
2015-04-21 16:17:56 -07:00
parent afa58e16ae
commit dc82da4650
3 changed files with 2 additions and 10 deletions

View File

@@ -86,8 +86,4 @@ class UIView
def stylesheet=(value)
rmq.stylesheet = value
end
def find(*args)
rmq(self).find(*args)
end
end

View File

@@ -51,10 +51,6 @@ class UIViewController
rmq.stylesheet = value
end
def find(*args)
rmq(self.view).find(*args)
end
def self.stylesheet(style_sheet_class)
@rmq_style_sheet_class = style_sheet_class
end

View File

@@ -225,12 +225,12 @@ describe 'UIView' do
end
it "should set use the proper context to find the children" do
@view.find(UIButton).count.should.equal(1)
find(@view).find(UIButton).count.should.equal(1)
end
it "should properly work with multiple arguments as well" do
@view.append(UILabel).tag(:something)
@view.find(UIButton, :something).count.should.equal(2)
find(@view).find(UIButton, :something).count.should.equal(2)
end
end
end