Created
January 14, 2009 23:59
-
-
Save robc/47169 to your computer and use it in GitHub Desktop.
This file contains 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
class ApprovedCampaignApplication::DataFeedsController < ApplicationController | |
def index | |
active_approved_campaign_application_status = ApprovedCampaignApplicationStatus.find_by_code("ACT") | |
end | |
end |
This file contains 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
require File.dirname(__FILE__) + '/../../spec_helper' | |
describe ApprovedCampaignApplication::DataFeedsController, "when calling the index action" do | |
before(:each) do | |
@mock_active_approved_campaign_application_status = mock_model(ApprovedCampaignApplicationStatus) | |
end | |
it "should retrieve the Active ApprovedApplicationStatus" do | |
ApprovedCampaignApplicationStatus.should_receive(:find_by_code).with('ACT').and_return(@mock_active_approved_campaign_application_status) | |
get :index | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment