update specs

bug/bundler_fix
Brent Cook 2017-05-27 00:34:12 -05:00
parent 71404f736e
commit 11b99d954d
2 changed files with 2 additions and 19 deletions

View File

@ -86,7 +86,7 @@ class Msfupdate
def validate_args
valid = true
if binary_install?
if binary_install? || apt?
if @git_branch
stderr.puts "[-] ERROR: git-branch is not supported on this installation"
valid = false
@ -96,7 +96,7 @@ class Msfupdate
valid = false
end
end
if git?
if apt? || git?
if @offline_file
stderr.puts "[-] ERROR: offline-file option is not supported on this installation"
valid = false

View File

@ -49,7 +49,6 @@ RSpec.describe Msfupdate do
before(:example) do
# By default, we want to ensure tests never actually try to execute any
# of the update methods unless we are explicitly testing them
allow(subject).to receive(:update_apt!)
allow(subject).to receive(:update_binary_install!)
allow(subject).to receive(:update_git!)
end
@ -219,10 +218,6 @@ RSpec.describe Msfupdate do
end
context "#run!" do
it "calls update_apt!" do
expect(subject).to receive(:update_apt!)
subject.run!
end
it "does not call update_binary_install!" do
expect(subject).not_to receive(:update_binary_install!)
subject.run!
@ -232,10 +227,6 @@ RSpec.describe Msfupdate do
subject.run!
end
end
context "#update_apt!" do
# TODO: Add more tests!
end
end
context "in a binary installation" do
@ -272,10 +263,6 @@ RSpec.describe Msfupdate do
end
context "#run!" do
it "does not call update_apt!" do
expect(subject).not_to receive(:update_apt!)
subject.run!
end
it "calls update_binary_install!" do
expect(subject).to receive(:update_binary_install!)
subject.run!
@ -326,10 +313,6 @@ RSpec.describe Msfupdate do
end
context "#run!" do
it "does not call update_apt!" do
expect(subject).not_to receive(:update_apt!)
subject.run!
end
it "does not call update_binary_install!" do
expect(subject).not_to receive(:update_binary_install!)
subject.run!