Sha256: 1b42b9e9093f2809eb2adf5fd14a1010f1e785b3cf7590985d2c5f846c4ff512

Contents?: true

Size: 426 Bytes

Versions: 3

Compression:

Stored size: 426 Bytes

Contents

require File.join(File.dirname(__FILE__), '..', 'spec_helper')
require "shared_factory_specs"
require 'rubyonacid/factories/skip'

include RubyOnAcid

describe SkipFactory do
  
  MARGIN = 0.01
  
  before :each do
    @it = SkipFactory.new
  end
  
  it_should_behave_like "a factory"
  
  it "generates only 0 or 1" do
    @it.odds = 0.1
    300.times do
      [0, 1].should include(@it.get_unit(:x))
    end
  end
  
  
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
rubyonacid-0.1.2 spec/generators/skip_spec.rb
rubyonacid-0.1.1 spec/generators/skip_spec.rb
rubyonacid-0.1.0 spec/generators/skip_spec.rb