Sha256: ee0b376a4c1415428c8cb13a9b77239e8b9ecaf047b85eeeeed711dbb25d6397

Contents?: true

Size: 872 Bytes

Versions: 1

Compression:

Stored size: 872 Bytes

Contents

require "spec_helper"

describe Vamp do
  it "has a version number" do
    expect(Vamp::VERSION).not_to be nil
  end

  it "has a vampire" do
    expect(Vamp::VAMPIRE).not_to be nil
  end

  it "gives string quote" do
    expect(quote).to be_a(String)
  end

  it "gives quote with 10 < length < 1000" do
    expect(quote.length).to be_between(11, 999)
  end

  subject(:messages) do
    messages = Set.new
    maximum = 10
    minimum = maximum / 1
  end
  it "gives different quotes" do
    messages = Set.new
    maximum = 10
    minimum = maximum / 1
    maximum.times { messages << quote }
    let()
    begin
      expect(messages.size).to be_between(minimum, maximum)
    rescue
      puts messages
      fail "we expected at least #{minimum} different messages for #{maximum}" \
           " calls. But we just got #{messages.size}: #{messages}"
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
vamp-0.1.0 spec/vamp_spec.rb