Sha256: c45886bad51ab3a3e7cea1086682312a855f9c4029a8eb3b40cae52917847647

Contents?: true

Size: 583 Bytes

Versions: 2

Compression:

Stored size: 583 Bytes

Contents

require 'cucumber/formatter/unicode'

Given /^a hash container size of (\d+)$/ do |size|
  @hasher = Hasher.new(size.to_i)
end

When /^the method hash is invoked with (.+?)$/ do |string|
  @output = @hasher.hash(string)
end

Then /^the number (\d+) is returned$/ do |result|
  @output.should == result.to_i
end

Given /^a hash container with a non\-prime size$/ do
  @size = 55
end

Then /^a (.+?) error should be raised$/ do |error|
  klass, exception = error.split(/::/)
  klass = Object.const_get(klass)
  lambda { Hasher.new(@size) }.should.raise(klass.const_get(exception))
end

Version data entries

2 entries across 2 versions & 2 rubygems

Version Path
kastner-hasher-0.2.0 features/steps/hasher_steps.rb
hasher-0.1.0 features/steps/hasher_steps.rb