Sha256: 2d6793dc3bdfc731d62a3d5dbd3564dae3eeb14472d89371bda897617acc6cef

Contents?: true

Size: 463 Bytes

Versions: 3

Compression:

Stored size: 463 Bytes

Contents

require 'spec_helper'

describe 'normalize' do
  subject { Class.new { include Pain }.new }

  it 'doesn\'t allow numbers too small' do
    expect(subject.normalize(0, :impact)).to  be_nil
    expect(subject.normalize(-1, :impact)).to be_nil
  end

  it 'doesn\'t allow numbers too big' do
    expect(subject.normalize(10, :bug_type)).to eq(7) 
    expect(subject.normalize(7,  :impact)).to   eq(5)
    expect(subject.normalize(7,  :bug_type)).to eq(7)
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
pain-0.0.3 spec/normalize_spec.rb
pain-0.0.2 spec/normalize_spec.rb
pain-0.0.1 spec/normalize_spec.rb