main
1require "spec_helper"
2
3describe ApplicationController do
4 let(:presenter_factory) { double }
5 subject { ApplicationController.new(presenter_factory) }
6
7 describe "#run" do
8 it "builds a new presenter and presents it" do
9 presenter = double(present: true)
10
11 presenter_factory.stub(:create).with(:stock_presenter).and_return(presenter)
12
13 subject.run(:stock_presenter)
14 presenter.should have_received(:present)
15 end
16 end
17end