Skip to content

Commit

Permalink
Remove the uses of #with without arguments
Browse files Browse the repository at this point in the history
  • Loading branch information
yujinakayama committed Apr 7, 2014
1 parent 0ecd51f commit cd9aeb0
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions spec/guard/notifiers/emacs_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
describe '.notify' do
context 'when no color options are specified' do
it 'should set modeline color to the default color using emacsclient' do
subject.should_receive(:run_cmd).with do |command|
subject.should_receive(:run_cmd) do |command|
command.should include("emacsclient")
command.should include(%{(set-face-attribute 'mode-line nil :background "ForestGreen" :foreground "White")})
end
Expand All @@ -18,7 +18,7 @@
let(:options) { {:success => 'Orange'} }

it 'should set modeline color to the specified color using emacsclient' do
subject.should_receive(:run_cmd).with do |command|
subject.should_receive(:run_cmd) do |command|
command.should include("emacsclient")
command.should include(%{(set-face-attribute 'mode-line nil :background "Orange" :foreground "White")})
end
Expand All @@ -31,7 +31,7 @@
let(:options) { {:pending => 'Yellow'} }

it 'should set modeline color to the specified color using emacsclient' do
subject.should_receive(:run_cmd).with do |command|
subject.should_receive(:run_cmd) do |command|
command.should include("emacsclient")
command.should include(%{(set-face-attribute 'mode-line nil :background "Yellow" :foreground "White")})
end
Expand Down
4 changes: 2 additions & 2 deletions spec/guard/notifiers/notifysend_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ def self.show(options) end
describe '.notify' do
context 'without additional options' do
it 'shows the notification with the default options' do
subject.should_receive(:system).with do |command, *arguments|
subject.should_receive(:system) do |command, *arguments|
command.should eql 'notify-send'
arguments.should include '-i', '/tmp/welcome.png'
arguments.should include '-u', 'low'
Expand All @@ -46,7 +46,7 @@ def self.show(options) end

context 'with additional options' do
it 'can override the default options' do
subject.should_receive(:system).with do |command, *arguments|
subject.should_receive(:system) do |command, *arguments|
command.should eql 'notify-send'
arguments.should include '-i', '/tmp/wait.png'
arguments.should include '-u', 'critical'
Expand Down

0 comments on commit cd9aeb0

Please sign in to comment.