Commit 2d311f9d authored by marcheing's avatar marcheing

Remove superfluous option and Rspec class explicit use on specs

parent 4a6c529d
Pipeline #3709921 passed with stage
in 9 minutes and 31 seconds
......@@ -18,7 +18,7 @@ require 'rails_helper'
# Message expectations are only used when there is no simpler way to specify
# that an instance is receiving a specific message.
RSpec.describe ContentsController, type: :controller do
describe ContentsController do
include Devise::TestHelpers
let(:valid_request_parameters) {
......
require 'rails_helper'
describe HomeController, type: :controller do
describe HomeController do
context 'actions' do
context 'index' do
describe 'Rendering' do
......
......@@ -18,7 +18,7 @@ require 'rails_helper'
# Message expectations are only used when there is no simpler way to specify
# that an instance is receiving a specific message.
RSpec.describe ProfilesController, type: :controller do
describe ProfilesController do
include Devise::TestHelpers
let(:valid_request_parameters) do
......
require 'rails_helper'
describe StaticViewsController, type: :controller do
describe StaticViewsController do
context 'actions' do
context 'terms_of_use' do
context 'rendering' do
......
require 'rails_helper'
describe ApplicationHelper, type: :helper do
describe ApplicationHelper do
describe 'i18n_logo' do
context 'en locale' do
let(:i18n_logo_name) { 'logo-en.png' }
......
......@@ -10,6 +10,6 @@ require 'rails_helper'
# end
# end
# end
RSpec.describe ContentsHelper, type: :helper do
describe ContentsHelper do
pending "add some examples to (or delete) #{__FILE__}"
end
require 'rails_helper'
describe ProfileHelper, type: :helper do
describe ProfileHelper do
describe 'country_select' do
let(:countries) { Carmen::Country.all }
let(:result) { helper.country_select }
......
require 'rails_helper'
RSpec.describe RequestZencoderJob, type: :job do
describe RequestZencoderJob do
describe 'perform' do
let(:video) { build(:video) }
let(:response_body) { { 'id' => 12 } }
......
require 'rails_helper'
RSpec.describe Content, type: :model do
describe Content do
describe 'validations' do
%i(title user_id soundtrack director).each do |field|
it { is_expected.to validate_presence_of field }
......
require 'rails_helper'
RSpec.describe EncodedContent, type: :model do
describe EncodedContent do
describe 'validations' do
it { is_expected.to validate_presence_of :content_id }
it { is_expected.to validate_presence_of :job_id }
......
require 'rails_helper'
RSpec.describe Profile, type: :model do
describe Profile do
describe 'associations' do
it { is_expected.to belong_to(:user) }
end
......
require 'rails_helper'
RSpec.describe User, type: :model do
describe User do
describe 'associations' do
it { is_expected.to have_one(:profile) }
it { is_expected.to have_many(:contents) }
......
require 'rails_helper'
RSpec.describe ContentsController, type: :routing do
describe ContentsController do
describe 'routing' do
it 'routes to #index' do
expect(get: '/contents').to_not route_to('contents#index')
......
require 'rails_helper'
describe HomeController, type: :routing do
describe HomeController do
describe 'routing' do
it 'routes root to index' do
expect(get: '/').to route_to(controller: 'home', action: 'index')
......
require 'rails_helper'
RSpec.describe ProfilesController, type: :routing do
describe ProfilesController do
describe 'routing' do
it 'routes to #index' do
expect(get: '/profiles').to_not route_to('profiles#index')
......
require 'rails_helper'
describe StaticViewsController, type: :routing do
describe StaticViewsController do
describe 'routing' do
it 'routes root to terms_of_use' do
expect(get: '/terms_of_use').to route_to(controller: 'static_views', action: 'terms_of_use')
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment