require File.expand_path(File.dirname(__FILE__) + '/../spec_helper') describe ISO10383 do let(:data) { {:city=>"WARSZAWA", :acr=>"WSE", :code=>"XWAR", :country=>"POLAND", :description=>"WARSAW STOCK EXCHANGE", :currency=>"PL"} } let(:different_data) {{:some => 'data'}} let(:iso_10383) { ISO10383.new(data) } it 'is equal to another ISO10383 object if contains the same data' do same_iso_10383 = ISO10383.new(data) different_iso_10383 = ISO10383.new(different_data) iso_10383.should == same_iso_10383 iso_10383.should_not == different_iso_10383 end it 'responds to code' do iso_10383.code.should == 'XWAR' end it 'responds to country' do iso_10383.country.should == 'POLAND' end end