Sha256: c322dbc40269b87bc2de7054fac8403bfbf7810f46bd603b18e0637fa203421e
Contents?: true
Size: 1.99 KB
Versions: 25
Compression:
Stored size: 1.99 KB
Contents
require 'spec_helper' # edge filters are also tested in filters_spec module Pacer::Filter::PropertyFilter Run.tg do describe EdgeFilters do subject { filters } context 'symbol label' do let(:filters) { Pacer::Route.edge_filters graph, [:label] } its(:any?) { should be_true } its(:labels) { should == ['label'] } its(:extensions_only?) { should be_false } its(:extensions) { should be_empty } its(:route_modules) { should be_empty } its(:wrapper) { should be_nil } its(:blocks) { should be_empty } its(:properties) { should be_empty } end context 'symbol labels' do let(:filters) { Pacer::Route.edge_filters graph, [:label, :label2] } its(:any?) { should be_true } its(:labels) { should == ['label', 'label2'] } end context 'labels arrays' do let(:filters) { Pacer::Route.edge_filters graph, ["label", [:label2]] } its(:any?) { should be_true } its(:labels) { should == ['label', 'label2'] } end context 'labels and properties' do let(:filters) { Pacer::Route.edge_filters graph, [:label, { prop: 'value' }] } its(:any?) { should be_true } its(:labels) { should == ['label'] } its(:properties) { should == [['prop', 'value']] } end context 'labels and extension' do let(:filters) { Pacer::Route.edge_filters graph, [:label, TP::Person] } its(:any?) { should be_true } its(:labels) { should == ['label'] } its(:extensions) { should == [TP::Person] } its(:properties) { should == [ %w[ type person ] ] } end context 'labels and simple extension' do let(:filters) { Pacer::Route.edge_filters graph, [:label, Tackle::SimpleMixin] } its(:any?) { should be_true } its(:labels) { should == ['label'] } its(:extensions) { should == [Tackle::SimpleMixin] } its(:properties) { should be_empty } end end end end
Version data entries
25 entries across 25 versions & 1 rubygems