Sha256: e4dca4234e9b2240b5134c73352a92db93353826625abe0bef4ed1ee94f45b2d

Contents?: true

Size: 647 Bytes

Versions: 3

Compression:

Stored size: 647 Bytes

Contents

require 'spec_helper'

describe Puffer::Filters do

  describe 'controller filters class generation' do

    it 'should generate class with proper name' do
      Puffer::Filters.controller_filters(Admin::UsersController).should == Admin::UsersControllerFilters
    end

    it 'should return Puffer::Filters subclass' do
      Puffer::Filters.controller_filters(Admin::UsersController).superclass.should == Puffer::Filters
    end

    it 'should set proper attributes' do
      Puffer::Filters.controller_filters(Admin::PostsController).new.attributes.keys.should == %w(user.email status title body puffer_search puffer_order)
    end

  end

end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
puffer-0.0.32 spec/lib/filters_spec.rb
puffer-0.0.31 spec/lib/filters_spec.rb
puffer-0.0.30 spec/lib/filters_spec.rb