When I run all tests or just tests of a file it is working normally, but when I try to run only a single test, it just does not spin.
I have this test
require 'test_helper'
class UserTest < ActiveSupport::TestCase
test "is ban" do
user = build(:user, role: :ban)
assert user.banned?
end
end
However, when I run this file, I have the expected response in the test
rake test test / models / user_test.rb
Run options: --seed 34310
Running tests:
.
Finished tests in 0.041871s, 23.8831 tests / s, 23.8831 assertions / s.
1 tests, 1 assertions, 0 failures, 0 errors, 0 skips
But when I want to run only a single function in the same way the rails documentation explains. ( link )
rake test test / models / user_test.rb is_ban
Run options: -n is_ban --seed 27215
Running tests:
Finished tests in 0.007734s, 0.0000 tests / s, 0.0000 assertions / s.
0 tests, 0 assertions, 0 failures, 0 errors, 0 skips
I do not have the is_ban test run, could anyone explain to me how I can only run a specific test? I've tried to do it in several ways and I was not successful.
I'm using Rails 4.0.2, Ruby 2.0 and I have some test gems installed like factory_girl, mocha and shoulda.