Reputation: 63647
I have a Rails feature test that is not being run. When I try $ rspec spec/features
or $ rspec
I get this output:
No examples found.
Finished in 0.00005 seconds
0 examples, 0 failures
Here is the code in my feature test that should be run:
# spec/features/alpha_sign_ups.rb
require 'spec_helper'
feature 'Alpha user sign ups' do
scenario 'with a valid email' do
visit root_path
fill_in 'Email', with: "[email protected]"
click_button 'Request Early Access'
expect(page).to have_content('whatever')
end
end
Upvotes: 1
Views: 84
Reputation: 63647
My file did not have a _spec.rb
suffix. Rspec only runs files as tests if they have this suffix.
Upvotes: 1
Reputation: 2705
In the Relish documents, it says:
by default, RSpec runs files that match "*/_spec.rb"
so
spec/features/alpha_sign_ups_spec.rb
will do.
https://www.relishapp.com/rspec/rspec-core/docs/configuration/pattern
Upvotes: 0