Sha256: ae4fa3f5ca1d6428280845f5d626be894887679dad95b054e8875aa4d84a2dd9
Contents?: true
Size: 1.35 KB
Versions: 2
Compression:
Stored size: 1.35 KB
Contents
require File.dirname(__FILE__) + '/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 end
Version data entries
2 entries across 2 versions & 2 rubygems
Version | Path |
---|---|
be9-ryba-0.0.3 | spec/ryba_spec.rb |
ryba-0.1.0 | spec/ryba_spec.rb |