Skip to content

Instantly share code, notes, and snippets.

@robc
Created January 14, 2009 23:59
Show Gist options
  • Save robc/47169 to your computer and use it in GitHub Desktop.
Save robc/47169 to your computer and use it in GitHub Desktop.
class ApprovedCampaignApplication::DataFeedsController < ApplicationController
def index
active_approved_campaign_application_status = ApprovedCampaignApplicationStatus.find_by_code("ACT")
end
end
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