Sha256: 52c4bbd863d8892935ff7565584eab74d24136418d7d3936fc0cb848425588e9

Contents?: true

Size: 349 Bytes

Versions: 3

Compression:

Stored size: 349 Bytes

Contents

# encoding: utf-8
require 'spec_helper.rb'

describe RateLimiter::Model do
  it 'prevents a model from being saved too soon' do
    message1 = Message.new

    message1.ip_address = '127.0.0.1'

    message1.save

    message2 = Message.new

    message2.ip_address = '127.0.0.1'

    message2.save

    message2.errors.count.should eq(1)
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
rate_limiter-0.0.6 spec/rate_limiter/model_spec.rb
rate_limiter-0.0.5 spec/rate_limiter/model_spec.rb
rate_limiter-0.0.4 spec/rate_limiter/model_spec.rb