Inspired by Travis CI's guide for complete beginner, I wanted to test Travis on my preferred language: Ruby.
I created a similar repo like Travis' sample PHP repo. Here is my attempt to make my own Travis repo test.
Inside that repo, I have a
return "1" + 1
No Rakefile found (looking for: rakefile, Rakefile, rakefile.rb, Rakefile.rb)
Travis CI runs rake by default to execute your tests. Please note that
you need to add rake to your Gemfile (adding it to the :test group
should be sufficient).
Travis is basically just a computer like any other. What it says is that by default, it will run
rake in that repo assuming that's where the tests are.
And indeed, if you were to clone your own repo and run
rake yourself, you'd get the same output you're reporting.
So either you provide another command to run to Travis, or install a test that will run when
rake is invoked (in your Rakefile, probably).
Also to note that your "Ruby file" doesn't really contain a test per se, just some code. Usually a test will assert things such as
assert_equal(2, sum) or
expect(sum).to eq(2) if you were to use Rspec. You can look up "ruby test frameworks" if you need more info about that.