-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #6 from ninoseki/fix-wrong-specs
fix: fix opposite specs
- Loading branch information
Showing
2 changed files
with
21 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,22 @@ | ||
# frozen_string_literal: true | ||
|
||
RSpec.describe RogueOne do | ||
it "has a version number" do | ||
expect(RogueOne::VERSION).not_to be nil | ||
RSpec.describe RogueOne::Detector do | ||
subject { described_class.new(target: "1.1.1.1") } | ||
|
||
describe "#report" do | ||
before do | ||
allow(subject).to receive(:top_100_domains).and_return(%w(google.com)) | ||
allow(Parallel).to receive(:processor_count).and_return(0) | ||
end | ||
|
||
let(:report) { subject.report } | ||
|
||
it do | ||
expect(report.dig(:verdict)).to eq("benign one") | ||
end | ||
|
||
it do | ||
expect(report.dig(:landing_pages)).to eq([]) | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,7 @@ | ||
# frozen_string_literal: true | ||
|
||
RSpec.describe RogueOne::Detector do | ||
subject { described_class.new(target: "1.1.1.1") } | ||
|
||
describe "#report" do | ||
before do | ||
allow(subject).to receive(:top_100_domains).and_return(%w(google.com)) | ||
allow(Parallel).to receive(:processor_count).and_return(0) | ||
end | ||
|
||
let(:report) { subject.report } | ||
|
||
it do | ||
expect(report.dig(:verdict)).to eq("benign one") | ||
end | ||
|
||
it do | ||
expect(report.dig(:landing_pages)).to eq([]) | ||
end | ||
RSpec.describe RogueOne do | ||
it "has a version number" do | ||
expect(RogueOne::VERSION).not_to be nil | ||
end | ||
end |