Skip to content

Commit

Permalink
Merge pull request #6 from ninoseki/fix-wrong-specs
Browse files Browse the repository at this point in the history
fix: fix opposite specs
  • Loading branch information
ninoseki committed Apr 30, 2019
2 parents 8867f65 + 7bfd16c commit 43ef63e
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 21 deletions.
21 changes: 18 additions & 3 deletions spec/detector_spec.rb
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
21 changes: 3 additions & 18 deletions spec/rogue_one_spec.rb
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

0 comments on commit 43ef63e

Please sign in to comment.