Sha256: 1e784987c0ac86769290c356cdd756722bffabf17efe9a34a8cbf532317cfbf3
Contents?: true
Size: 904 Bytes
Versions: 1
Compression:
Stored size: 904 Bytes
Contents
require File.expand_path(File.dirname(__FILE__) + '/../spec_helper') describe RePublicationsController do extend RulesEngineMacros integrate_views before(:each) do controller.instance_eval { flash.stub!(:sweep) } controller.stub!(:rules_engine_reader_access_required).and_return(true) end describe "show" do it_should_require_rules_engine_reader_access(:show, :id => 123) it "should get the audit history record with the process ID" do re_plan = RePlan.make(:code => "mock_code") publisher = mock('publisher') RulesEngine::Publish.stub!(:publisher).and_return(publisher) re_publications = {:history => "none"} publisher.should_receive(:history).with("mock_code", anything).and_return(re_publications) get :show, :id => re_plan.id assigns[:re_publications].should == re_publications end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
rules_engine-0.2.0 | rails_generators/templates/spec/controllers/re_publications_controller_spec.rb |