Sha256: f000259800f27a3bc92e3a19421fab16cb58c1c4f7f99c8c0872d42c4e68ba1e

Contents?: true

Size: 944 Bytes

Versions: 24

Compression:

Stored size: 944 Bytes

Contents

require 'spec_helper'

describe Internals::Generators::PartialGenerator do

  context 'integration' do
    it 'should generate the correct values with a given strategy' do
      generator = described_class.new :meier => [1], :maier => [2]
      
      generator.generate(Internals::Generators::Partial::Substring.new).should == {
        :meier => [1],
        :meie => [1],
        :mei => [1],
        :me => [1],
        :m => [1, 2],
        :maier => [2],
        :maie => [2],
        :mai => [2],
        :ma => [2]
      }
    end
    it 'should generate the correct values with a given specific strategy' do
      generator = described_class.new :meier => [1], :maier => [2]
      
      generator.generate(Internals::Generators::Partial::Substring.new(:from => 3)).should == {
        :meier => [1],
        :meie => [1],
        :mei => [1],
        :maier => [2],
        :maie => [2],
        :mai => [2]
      }
    end
  end

end

Version data entries

24 entries across 24 versions & 1 rubygems

Version Path
picky-2.5.2 spec/lib/internals/generators/partial_generator_spec.rb
picky-2.5.1 spec/lib/internals/generators/partial_generator_spec.rb
picky-2.5.0 spec/lib/internals/generators/partial_generator_spec.rb
picky-2.4.3 spec/lib/internals/generators/partial_generator_spec.rb
picky-2.4.2 spec/lib/internals/generators/partial_generator_spec.rb
picky-2.4.1 spec/lib/internals/generators/partial_generator_spec.rb
picky-2.4.0 spec/lib/internals/generators/partial_generator_spec.rb
picky-2.3.0 spec/lib/internals/generators/partial_generator_spec.rb
picky-2.2.1 spec/lib/internals/generators/partial_generator_spec.rb
picky-2.2.0 spec/lib/internals/generators/partial_generator_spec.rb
picky-2.1.2 spec/lib/internals/generators/partial_generator_spec.rb
picky-2.1.1 spec/lib/internals/generators/partial_generator_spec.rb
picky-2.1.0 spec/lib/internals/generators/partial_generator_spec.rb
picky-2.0.0 spec/lib/internals/generators/partial_generator_spec.rb
picky-2.0.0.pre3 spec/lib/internals/generators/partial_generator_spec.rb
picky-2.0.0.pre2 spec/lib/internals/generators/partial_generator_spec.rb
picky-2.0.0.pre1 spec/lib/internals/generators/partial_generator_spec.rb
picky-1.5.4 spec/lib/internals/generators/partial_generator_spec.rb
picky-1.5.3 spec/lib/internals/generators/partial_generator_spec.rb
picky-1.5.2 spec/lib/internals/generators/partial_generator_spec.rb