Sha256: 58574a2da63479e3fbfc92f786f9c8efea98952151f27686e710801aa0df7d75
Contents?: true
Size: 1.63 KB
Versions: 1
Compression:
Stored size: 1.63 KB
Contents
require 'spec_helper' describe "Ryba" do describe "Name" do before :all do @name = Ryba::Name end it "should work for male" do @name.first_name(true) @name.middle_name(true) @name.family_name(true) @name.full_name(true) end it "should work for female" do @name.first_name(false) @name.middle_name(false) @name.family_name(false) @name.full_name(false) end it "should work with random gender" do @name.gender do |gender| @name.first_name(gender) @name.middle_name(gender) @name.family_name(gender) @name.full_name(gender) end end end describe "PhoneNumber" do before :all do @pn = Ryba::PhoneNumber end it "should work" do 20.times do @pn.phone_number.should match(/\d/) end end end describe "Address" do before :all do @adr = Ryba::Address end it "#index should be integer" do 20.times do @adr.index.should be_kind_of(Integer) end end [:city, :full_city, :street, :address, :postal].each do |meth| it "##{meth} should return not empty string" do 20.times do str = @adr.send(meth) str.should be_kind_of(String) str.should_not be_empty end end end end describe "Company" do it "#name should work" do 20.times do n = Ryba::Company.name n.should_not be_empty end end it "#name with options should work" do 20.times do n = Ryba::Company.name(:solidity => 3) n.should_not be_empty end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
ryba-0.1.2 | spec/ryba_spec.rb |