From f183bd8ec8ad4ebae65135d8218b79cbf1c5c7d1 Mon Sep 17 00:00:00 2001 From: Shaun McDonald Date: Tue, 26 May 2009 14:45:30 +0000 Subject: [PATCH 1/1] Some test improvements --- test/fixtures/countries.yml | 22 ++++++++++++---------- test/unit/country_test.rb | 9 +++++---- test/unit/language_test.rb | 7 +++---- 3 files changed, 20 insertions(+), 18 deletions(-) diff --git a/test/fixtures/countries.yml b/test/fixtures/countries.yml index f68d7023a..fec13e296 100644 --- a/test/fixtures/countries.yml +++ b/test/fixtures/countries.yml @@ -1,13 +1,15 @@ # Read about fixtures at http://ar.rubyonrails.org/classes/Fixtures.html -one: - min_lat: - max_lat: - min_lon: - max_lon: +gb: + code: gb + min_lat: 49.9061889648438 + max_lat: 60.8458099365234 + min_lon: -8.62355613708496 + max_lon: 1.75900018215179 -two: - min_lat: - max_lat: - min_lon: - max_lon: +de: + code: de + min_lat: 47.2757720947266 + max_lat: 55.0556411743164 + min_lon: 5.865638256073 + max_lon: 15.0398902893066 diff --git a/test/unit/country_test.rb b/test/unit/country_test.rb index 2adc94773..84bb2c4a1 100644 --- a/test/unit/country_test.rb +++ b/test/unit/country_test.rb @@ -1,8 +1,9 @@ -require 'test_helper' +require File.dirname(__FILE__) + '/../test_helper' class CountryTest < ActiveSupport::TestCase - # Replace this with your real tests. - test "the truth" do - assert true + fixtures :countries + + test "country count" do + assert_equal 2, Country.count end end diff --git a/test/unit/language_test.rb b/test/unit/language_test.rb index a366793ef..da3004459 100644 --- a/test/unit/language_test.rb +++ b/test/unit/language_test.rb @@ -1,8 +1,7 @@ -require 'test_helper' +require File.dirname(__FILE__) + '/../test_helper' class LanguageTest < ActiveSupport::TestCase - # Replace this with your real tests. - test "the truth" do - assert true + test "language count" do + assert_equal 2, Language.count end end -- 2.43.2