Skip to content

Commit

Permalink
Added specs for the default values of --host and --port options.
Browse files Browse the repository at this point in the history
  • Loading branch information
postmodern committed Jul 6, 2024
1 parent 1d8232d commit 722533a
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 0 deletions.
12 changes: 12 additions & 0 deletions spec/cli/commands/dns_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -107,5 +107,17 @@
end
end
end

context "when no options are given" do
let(:argv) { [] }

it "must default options[:host] to '0.0.0.0'" do
expect(subject.options[:host]).to eq('0.0.0.0')
end

it "must default options[:port] to 53" do
expect(subject.options[:port]).to eq(53)
end
end
end
end
12 changes: 12 additions & 0 deletions spec/cli/commands/http_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -107,5 +107,17 @@
end
end
end

context "when no options are given" do
let(:argv) { [] }

it "must default options[:host] to '0.0.0.0'" do
expect(subject.options[:host]).to eq('0.0.0.0')
end

it "must default options[:port] to 8080" do
expect(subject.options[:port]).to eq(8080)
end
end
end
end

0 comments on commit 722533a

Please sign in to comment.