Last active
December 22, 2015 04:59
-
-
Save s2kw/6420859 to your computer and use it in GitHub Desktop.
RubyMotion Test Tutorial.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
describe "Application 'Tests'" do | |
before do | |
@app = UIApplication.sharedApplication | |
end | |
it "has one window" do | |
@app.windows.size.should == 1 | |
end | |
end | |
describe "button controller" do | |
tests ButtonController | |
it "changes instance variable when button is tapped" do | |
# @button.accessibilityLabel で指定した文字列で検索しにいく。 | |
tap 'Test me!' | |
# controller はButtonControllerのエイリアス | |
# @was_tappedが存在するか確認。 | |
controller.instance_variable_get('@was_tapped').should == true | |
end | |
end | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment