spec/lib/metasploit/model/spec_spec.rb in metasploit-model-0.30.2-java vs spec/lib/metasploit/model/spec_spec.rb in metasploit-model-1.0.0.pre.rails.pre.4.0

- old
+ new

@@ -1,6 +1,8 @@ -RSpec.describe Metasploit::Model::Spec do +require 'spec_helper' + +describe Metasploit::Model::Spec do before(:each) do @before_temporary_pathname = described_class.send(:remove_instance_variable, :@temporary_pathname) end after(:each) do @@ -31,15 +33,15 @@ f.puts 'Child File' end end it 'should remove file tree' do - expect(pathname.exist?).to eq(true) + pathname.exist?.should be_true remove_temporary_pathname - expect(pathname.exist?).to eq(false) + pathname.exist?.should be_false end end context 'that does not exist' do it 'should not raise an error' do @@ -78,11 +80,11 @@ temporary_pathname }.to_not raise_error end it 'should return set pathname' do - expect(temporary_pathname).to eq(pathname) + temporary_pathname.should == pathname end end context 'without @temporary_pathname defined' do it 'should raise Metasploit::Model::Spec::Error' do @@ -103,14 +105,10 @@ it 'should set @temporary_pathname' do expect { described_class.temporary_pathname = temporary_pathname }.to change { - if described_class.instance_variable_defined? :@temporary_pathname - described_class.instance_variable_get(:@temporary_pathname) - else - nil - end + described_class.instance_variable_get(:@temporary_pathname) }.to(temporary_pathname) end end end \ No newline at end of file