Sha256: 69c2f6cbcd9b83e3a0059568532bc4e68e1bb27b8bd7ed1f8257c96d87ce6cc7
Contents?: true
Size: 1.42 KB
Versions: 3
Compression:
Stored size: 1.42 KB
Contents
require 'support/generators' RSpec.describe Adminos::Generators::FeedbackGenerator, type: :generator do prepare_app(folder_name: 'dummy') generate('adminos:feedback') context 'controllers' do describe 'app/controllers/feedbacks_controller.rb' do subject { file('app/controllers/feedbacks_controller.rb') } it { is_expected.to exist } end describe 'app/controllers/admin/feedbacks_controller.rb' do subject { file('app/controllers/admin/feedbacks_controller.rb') } it { is_expected.to exist } end end context 'models' do describe 'app/models/feedback.rb' do subject { file('app/models/feedback.rb') } it { is_expected.to exist } end end context 'views' do describe 'app/views/admin/feedbacks/_fields.slim' do subject { file('app/views/admin/feedbacks/_fields.slim') } it { is_expected.to exist } end describe 'app/views/admin/feedbacks/index.slim' do subject { file('app/views/admin/feedbacks/index.slim') } it { is_expected.to exist } end describe 'app/views/shared/admin/_sidebar.slim' do subject { file('app/views/shared/admin/_sidebar.slim') } it { is_expected.to contain /admin_feedbacks_path/ } end end context 'config' do describe 'config/routes.rb' do subject { file('config/routes.rb') } it { is_expected.to contain /resources :feedbacks, except: :show do/ } end end end
Version data entries
3 entries across 3 versions & 1 rubygems