Sha256: cf2b2125194a48116039bb14452f91b2e23681864389cca5814fee12cf0be745

Contents?: true

Size: 613 Bytes

Versions: 14

Compression:

Stored size: 613 Bytes

Contents

require 'spec_helper'

describe RubyReportable::Filter do

  context "a filter" do
    before do
      @filter = RubyReportable::Filter.new('G Methods')
    end

    it "should store variables internally" do
      @filter[:logic].should == nil

      @filter.key(:g)
      @filter.logic do
        element.include?('g')
      end

      @filter[:key].should == :g
      @filter[:logic].should_not == nil
    end

    context "#require" do
      it "should automatically assume it is required when no block is given" do
        @filter.require

        @filter[:require].should == true
      end
    end
  end
end

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
ruby_reportable-0.5.1 spec/filter_spec.rb
ruby_reportable-0.5.0 spec/filter_spec.rb
ruby_reportable-0.4.3 spec/filter_spec.rb
ruby_reportable-0.4.2 spec/filter_spec.rb
ruby_reportable-0.4.1 spec/filter_spec.rb
ruby_reportable-0.4.0 spec/filter_spec.rb
ruby_reportable-0.3.1 spec/filter_spec.rb
ruby_reportable-0.3.0 spec/filter_spec.rb
ruby_reportable-0.2.0 spec/filter_spec.rb
ruby_reportable-0.1.3.1 spec/filter_spec.rb
ruby_reportable-0.1.3 spec/filter_spec.rb
ruby_reportable-0.1.2 spec/filter_spec.rb
ruby_reportable-0.1.1 spec/filter_spec.rb
ruby_reportable-0.1.0 spec/filter_spec.rb