Skip to content

Commit

Permalink
s/mock/double in specs to fix the build
Browse files Browse the repository at this point in the history
  • Loading branch information
ipoval committed Aug 28, 2014
1 parent 3844353 commit 666c8d4
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion spec/shelr/publisher_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
end

describe "#dump(id)" do
let(:file) { mock('dump file') }
let(:file) { double('dump file') }

before do
File.stub(:open).and_yield file
Expand Down
4 changes: 3 additions & 1 deletion spec/shelr/recorder_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,10 @@
end

describe "#init_terminal" do
let(:win_grid) { double(:size => { :width => 10, :height => 20 }) }

it "gets user_columns and user_rows from system" do
Shelr.stub(:terminal).and_return(mock(:size => { :width => 10, :height => 20 }))
Shelr.stub(:terminal).and_return(win_grid)
subject.send :init_terminal
subject.user_rows.should == 20
subject.user_columns.should == 10
Expand Down

0 comments on commit 666c8d4

Please sign in to comment.