spec/models/metasploit/credential/blank_username_spec.rb in metasploit-credential-0.14.5 vs spec/models/metasploit/credential/blank_username_spec.rb in metasploit-credential-0.14.6

- old
+ new

@@ -1,26 +1,24 @@ -require 'spec_helper' - -describe Metasploit::Credential::BlankUsername do +RSpec.describe Metasploit::Credential::BlankUsername, type: :model do it_should_behave_like 'Metasploit::Concern.run' context 'database' do context 'columns' do it_should_behave_like 'timestamp database columns' - it { should have_db_column(:username).of_type(:string).with_options(null: false) } - it { should have_db_column(:type).of_type(:string).with_options(null: false) } + it { is_expected.to have_db_column(:username).of_type(:string).with_options(null: false) } + it { is_expected.to have_db_column(:type).of_type(:string).with_options(null: false) } end context 'indices' do - it { should have_db_index(:username).unique(true) } + it { is_expected.to have_db_index(:username).unique(true) } end end context 'mass assignment security' do it { should_not allow_mass_assignment_of(:created_at) } it { should_not allow_mass_assignment_of(:updated_at) } - it { should allow_mass_assignment_of(:username) } + it { is_expected.to allow_mass_assignment_of(:username) } end end