Sha256: cdeab0f048e578e4c4af090f88002dfaf9ae2cd975bdf4b330e475a947797077

Contents?: true

Size: 418 Bytes

Versions: 10

Compression:

Stored size: 418 Bytes

Contents

require 'spec_helper'

describe Datagrid::Utils do
  

  describe ".warn_once" do
    it "should work" do
      silence_warnings do
        Datagrid::Utils.warn_once("hello", 0.2).should be_true
      end
      sleep(0.1)
      Datagrid::Utils.warn_once("hello", 0.2).should be_false
      sleep(0.2)
      silence_warnings do
        Datagrid::Utils.warn_once("hello", 0.2).should be_true
      end
    end
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
datagrid-1.2.0 spec/datagrid/utils_spec.rb
datagrid-1.1.2 spec/datagrid/utils_spec.rb
datagrid-1.1.1 spec/datagrid/utils_spec.rb
datagrid-1.1.0 spec/datagrid/utils_spec.rb
datagrid-1.0.5 spec/datagrid/utils_spec.rb
datagrid-1.0.4 spec/datagrid/utils_spec.rb
datagrid-1.0.3 spec/datagrid/utils_spec.rb
datagrid-1.0.2 spec/datagrid/utils_spec.rb
datagrid-1.0.1 spec/datagrid/utils_spec.rb
datagrid-1.0.0 spec/datagrid/utils_spec.rb