Sha256: 64a1e51ca335ef23c8968d31972489c6613bd3e3b5a23645f5ad7868351be2ec

Contents?: true

Size: 749 Bytes

Versions: 8

Compression:

Stored size: 749 Bytes

Contents

require File.dirname(__FILE__) + '/../spec_helper'

describe RePipelineActivatedObserver do
  def valid_attributes
    {
      :code => "aa_mock",
      :title => "Mock Title"
    }
  end
  
  describe "after create" do
    it "should reset the pipeline activated cache" do
      RePipelineActivated.should_receive(:reset_cache).with('aa_mock')
      RePipelineActivated.create(valid_attributes)
    end
  end
  
  describe "after save" do
    before do
      @pipeline_activated = RePipelineActivated.create(valid_attributes)
    end
    
    it "should reset the pipeline activated cache" do
      RePipelineActivated.should_receive(:reset_cache).with('aa_mock')
      @pipeline_activated.update_attributes(:title => "New Title")
    end
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
rules_engine-0.1.1 rails_generators/templates/spec/models/re_pipeline_activated_observer_spec.rb
rules_engine-0.1.0 rails_generators/templates/spec/models/re_pipeline_activated_observer_spec.rb
rules_engine-0.0.8 rails_generators/templates/spec/models/re_pipeline_activated_observer_spec.rb
rules_engine-0.0.7 rails_generators/templates/spec/models/re_pipeline_activated_observer_spec.rb
rules_engine-0.0.6 rails_generators/templates/spec/models/re_pipeline_activated_observer_spec.rb
rules_engine-0.0.5 rails_generators/templates/spec/models/re_pipeline_activated_observer_spec.rb
rules_engine-0.0.4 rails_generators/templates/spec/models/re_pipeline_activated_observer_spec.rb
rules_engine-0.0.3 rails_generators/templates/spec/models/re_pipeline_activated_observer_spec.rb