Sha256: 20466fb72c15f96654430ec64e2697caeb0d02f21648ec2ce68fe5b44aa78811

Contents?: true

Size: 447 Bytes

Versions: 2

Compression:

Stored size: 447 Bytes

Contents

'require spec_helper'

describe 'a Fibonacci sequence implemented in Decorators' do
  let(:fibber) { Decorum::BareParticular.new }

  before(:each) do
    100.times do
      fibber._decorum_decorate(Decorum::Examples::FibonacciDecorator)
    end
  end

  it 'returns the 100th term' do 
    expect(fibber.fib).to eq(927372692193078999176)
  end

  it 'stores the sequence' do
    fibber.fib
    expect(fibber.sequence.length).to eq(100)
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
decorum-0.5.1 spec/integration/fibonacci_spec.rb
decorum-0.5.0 spec/integration/fibonacci_spec.rb