Sha256: 82aab658499d1c2535ef8e743c37dede91c5d56e2ac2cff4bdadb8c063bf604f

Contents?: true

Size: 703 Bytes

Versions: 10

Compression:

Stored size: 703 Bytes

Contents

require File.expand_path(File.dirname(__FILE__) + '/../spec_helper')

RSpec::Matchers.define :have_valid_kid_keys do
  match do |actual|
    actual.kid_date.to_s.should =~ /\A\d+\Z/
    actual.kid_time.to_s.should =~ /\A\d+\Z/
    actual.kid_user.should =~ /\A\w{4}\Z/
    actual.kid_mult.to_s.should =~ /\A\d+\Z/
    actual.kid_comm.to_s.should =~ /\A\d+\Z/
  end
end

describe CityPair do

    it "sets kid values for new city_pair" do
      city_pair = CityPair.new
      city_pair.should have_valid_kid_keys
    end

    it "sets kid vlues for CityCost" do
      city_pair = CityPair.new
      city_cost = CityCost.new(:city_pair=>city_pair)
      city_cost.should have_valid_kid_keys
    end

end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
fossil-0.5.50 spec/models/city_pair_spec.rb
fossil-0.5.49 spec/models/city_pair_spec.rb
fossil-0.5.48 spec/models/city_pair_spec.rb
fossil-0.5.47 spec/models/city_pair_spec.rb
fossil-0.5.46 spec/models/city_pair_spec.rb
fossil-0.5.45 spec/models/city_pair_spec.rb
fossil-0.5.44 spec/models/city_pair_spec.rb
fossil-0.5.43 spec/models/city_pair_spec.rb
fossil-0.5.42 spec/models/city_pair_spec.rb
fossil-0.5.41 spec/models/city_pair_spec.rb