spec/command/rebind_spec.rb in retter-0.0.3 vs spec/command/rebind_spec.rb in retter-0.0.4

- old
+ new

@@ -26,10 +26,12 @@ before do wip_file.open('w') {|f| f.puts article } Date.stub!(:today).and_return(Date.parse(date_str)) + command.should_receive(:invoke_after).with(:bind) + command.should_receive(:invoke_after).with(:rebind) command.rebind end describe 'today.md' do it { wip_file.should_not be_exist } @@ -55,7 +57,18 @@ it { texts_of(entry_html, '.entry p').should be_include('おはようございます') } it { texts_of(entry_html, '.entry h1.date').should == %w(2011/01/01) } it { texts_of(entry_html, '.entry h1').should == %w(2011/01/01 朝11時 夜1時) } end + end + + context 'with silent option' do + before do + wip_file.open('w') {|f| f.puts 'article' } + command.stub!(:options) { {silent: true} } + + command.should_not_receive(:invoke_after) + end + + it { command.rebind.should } end end