Sha256: 70c7031c592d823364f5d740a00a92c478620ff5b893f72540854bd92f777bb1

Contents?: true

Size: 543 Bytes

Versions: 10

Compression:

Stored size: 543 Bytes

Contents

require 'spec_helper'

class MyFilter < CanTango::Filter::Base
  def initialize item, list
    super
  end
end

describe CanTango::Filter::Base do
  context "a and list of a,b,c" do
    before do
      @list = ['a', 'b', 'c'] 
    end
    subject { MyFilter.new 'a', @list }
  
    its(:include_list) { should == @list.map(&:to_sym) }
    its(:item) { should == :a }
  
    its(:valid?) { should be_true }
    its(:in_include_list?) { should be_true }

    its(:not_only?) { should be_false }
    its(:excluded?) { should be_false }
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
cantango-core-0.1.9.3 spec/cantango/filter/base_spec.rb
cantango-core-0.1.9.2 spec/cantango/filter/base_spec.rb
cantango-core-0.1.9.1 spec/cantango/filter/base_spec.rb
cantango-core-0.1.9 spec/cantango/filter/base_spec.rb
cantango-core-0.1.8 spec/cantango/filter/base_spec.rb
cantango-core-0.1.7 spec/cantango/filter/base_spec.rb
cantango-core-0.1.6 spec/cantango/filter/base_spec.rb
cantango-core-0.1.5 spec/cantango/filter/base_spec.rb
cantango-core-0.1.4 spec/cantango/filter/base_spec.rb
cantango-core-0.1.3 spec/cantango/filter/base_spec.rb