Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
branch: master
Fetching contributors…

Octocat-spinner-32-eaf2f5

Cannot retrieve contributors at this time

file 42 lines (38 sloc) 1.084 kb
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42
require 'place'

describe Place do
  describe "filled in object" do
    before do
      @name = "my place"
      @description = "my very nice place"
      @options = {'up' => 'another place'}
      @place = Place.new(@name, @description, @options)
    end
    it 'should have a name' do
      @place.name.should_not be_nil
      @place.name.should == @name
    end
    it 'should have a description' do
      @place.description.should_not be_nil
    end
    it 'the description should be what was initialized' do
      @place.description.should == @description
    end
    it 'should have a list of links' do
      @place.links.should == {'up' => 'another place'}
    end

  end

  describe "default values" do
    before do
      @place = Place.new
    end
    it 'should have a description' do
      @place.description.should_not be_nil
    end

    it 'should have a description' do
      @place.description.should == "the vastness of space"
    end
    it 'should have a name' do
      @place.name.should == "empty place"
    end
  end
end
Something went wrong with that request. Please try again.