Skip to content

Instantly share code, notes, and snippets.

@cassiomarques
Created October 3, 2009 22:33
Show Gist options
  • Save cassiomarques/200941 to your computer and use it in GitHub Desktop.
Save cassiomarques/200941 to your computer and use it in GitHub Desktop.
describe ".estado" do
before :each do
@estado1 = "SP"
@estado2 = "RJ"
@anuncio1 = Anuncio.make :estado => @estado1
@anuncio2 = Anuncio.make :estado => @estado1
@anuncio3 = Anuncio.make :estado => @estado2
@anuncio4 = Anuncio.make :estado => @estado2
end
it "deve retornar anuncios de um estado específico" do
Anuncio.estado(@estado1).to_set.should == Set.new([@anuncio1, @anuncio2])
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment