Sha256: 7de31dbc5862f6cc1a34e78f4f0c61f52de6c1e7ad9896fde0c5cde022417b39

Contents?: true

Size: 410 Bytes

Versions: 4

Compression:

Stored size: 410 Bytes

Contents

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

include RubyOnAcid

describe SkipFactory do
  
  
  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

4 entries across 4 versions & 1 rubygems

Version Path
rubyonacid-0.4.0 spec/factories/skip_spec.rb
rubyonacid-0.3.1 spec/factories/skip_spec.rb
rubyonacid-0.3.0 spec/factories/skip_spec.rb
rubyonacid-0.2.0 spec/factories/skip_spec.rb