Ruby on Rails
Friday, February 6, 2015
On Friday, 6 February 2015 16:49:35 UTC+1, Javix wrote:
I can't figure out why the following Rakefile:require 'rake/testtask'
task default: :test
Rake::TestTask.new do |t|
t.libs << %w(test lib)
t.pattern = "test/test_*.rb"
end
see no test test files when running rake from the root of the project:minitest-project
- lib
- meme.rb
- test
- test_meme.rb
- test_helper.rb
here the content of test_helper.rb:require 'minitest/autorun'
require 'minitest/reporters'
Minitest::Reporters.use! Minitest::Reporters::SpecReporter .new # spec-like progress
When running rake:Run options: --seed 54795
# Running tests:
Finished tests in 0.004000s, 0.0000 tests/s, 0.0000 assertions/s.
0 tests, 0 assertions, 0 failures, 0 errors, 0 skips
Minitest version: minitest (5.5.0, 4.7.5)
Ruby version: ruby 2.1.5p273 (2014-11-13 revision 48405) [x64-mingw32]
Any idea ?
Thank you
I forgot to post the content of the test class TestMeme :
require 'test_helper'
require 'meme'
class TestMeme < Minitest::Test
def setup
@meme = Meme.new
end
def test_that_kitty_can_eat
assert_equal "OHAI!", @meme.i_can_has_cheezburger?
end
def test_that_it_will_not_blend
refute_match /^no/i, @meme.will_it_blend?
end
def test_that_will_be_skipped
skip "test this later"
end
end
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/1742ddf9-f042-4b98-9a61-5f25fad0301c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment