-
Notifications
You must be signed in to change notification settings - Fork 14
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Question for RubyMotion users: How to test in RubyMotion? #7
Comments
I'm not super familiar with RubyMotion, but I know it uses a miniature version of RSpec called Bacon to run tests. This is the RubyMotion documentation on testing. Beyond that, I think there are a couple different ways you can go. First, you could just write a little RubyMotion app hit the endpoints that we want to test and then just write Bacon tests to test that the views render properly or something. I think this is kind of cumbersum though, because then you have two completely different test pools to maintain. It looks like you can also set up your rakefile like: $:.unshift("/Library/RubyMotion/lib")
require 'motion/project'
$:.unshift("./lib/")
require './lib/dish'
Motion::Project::App.setup do |app|
end
task :spec do
App.config.spec_mode = true
spec_files = App.config.spec_files
App.config.instance_variable_set("@spec_files", spec_files)
Rake::Task["simulator"].invoke
end and then run |
Yeah. Thanks. |
We would also have to switch over to RSpec, which I think would be a good move. It's up to you though. If it is something that you think is worthwhile, we should probably do it sooner rather than later... our test pool is only going to grow! I do a ton of work with RSpec, so I could probably move over all the tests pretty quickly. I agree using Travis CI is a good idea. Here is there blog post discussing testing of RubyMotion apps/gems. |
That's great. |
Definitely! I'm pretty swamped right now but I'll work in it over the next few says and then open a PR |
Great. Thanks man 👍 |
@tommyschaefer did you make any progress on converting the tests to RSpec? |
Right now we don't have any tests for the project in RubyMotion.
Anybody have ideas on how to automatically test the project with RubyMotion?
Thanks.
The text was updated successfully, but these errors were encountered: