Skip to content

Commit

Permalink
Use Semantic Rule for Block Delimiters
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexWayfer committed Apr 4, 2018
1 parent 46637ce commit f662b8f
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
16 changes: 8 additions & 8 deletions spec/lib/guard/puma/runner_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,11 @@
context "without pumactl" do
let(:options) { { pumactl: false } }

let(:uri) do
let(:uri) {
URI(
"http://#{runner.control_url}/#{cmd}?token=#{runner.control_token}"
)
end
}

it "#{cmd}s" do
expect(Net::HTTP).to receive(:get).with(uri).once
Expand All @@ -39,9 +39,9 @@
allow(runner).to receive(:in_windows_cmd?).and_return(false)
end

let(:command) do
let(:command) {
%(sh -c 'cd #{Dir.pwd} && pumactl #{runner.cmd_opts} #{cmd} ')
end
}

it "#{cmd}s" do
expect(Kernel).to receive(:system).with(command).once
Expand Down Expand Up @@ -101,12 +101,12 @@
end

context "and additional options" do
let(:options) do
let(:options) {
{
config: path, port: "4000",
quiet: false, environment: environment
}
end
}

it "assumes options are set in config" do
expect(runner.cmd_opts).to match("--config #{path}")
Expand All @@ -125,13 +125,13 @@
end

context "and additional options" do
let(:options) do
let(:options) {
{
pumactl: true,
config: path, port: "4000",
quiet: false
}
end
}

it "assumes options are set in config" do
expect(runner.cmd_opts).to match("--config-file #{path}")
Expand Down
4 changes: 2 additions & 2 deletions spec/lib/guard/puma_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -149,9 +149,9 @@
end

context "with custom :notifications option" do
let(:options) do
let(:options) {
{ notifications: [:restarted] }.merge!(zero_restart_timeout)
end
}

it "restarts and show the message only about restarted" do
allow(Guard::Compat::UI).to receive(:info)
Expand Down

0 comments on commit f662b8f

Please sign in to comment.