Sha256: 3e7fd8bba016d41171737ea8aea142cae1d3df9dc0b5ce6e19320fc4eab5d928

Contents?: true

Size: 385 Bytes

Versions: 5

Compression:

Stored size: 385 Bytes

Contents

require "spec_helper"

module Tim
  describe TemplatesController, :type => :controller do
    describe "Controller Decorator Pattern" do
      it "should allow overriding of instance variables in before filter" do
        Tim::Template.stub(:limit).and_return("test")
        get :index
        controller.instance_variable_get(:@templates).should == "test"
      end
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
tim-0.3.0 spec/decorators/controllers/templates_controller_decorator_spec.rb
tim-0.2.0 spec/decorators/controllers/templates_controller_decorator_spec.rb
tim-0.1.2 spec/decorators/controllers/templates_controller_decorator_spec.rb
tim-0.1.1 spec/decorators/controllers/templates_controller_decorator_spec.rb
tim-0.0.1 spec/decorators/controllers/templates_controller_decorator_spec.rb