Created
October 7, 2008 00:53
-
-
Save aslakhellesoy/15199 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
describe Controller do | |
before(:each) do | |
@model = mock("model").as_null_object | |
@view = mock("view").as_null_object | |
@controller = Controller.new(@model, @view) | |
end | |
def act | |
@return_value = @controller.act_on(:some_input) | |
end | |
it "should get data from model" do | |
@model.should_receive(:data_for).with(:some_input) | |
act | |
end | |
it "should return :success" do | |
act | |
@return_value.should == :success | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment