Revisions

gist: 200941 Download_button fork
public
Public Clone URL: git://gist.github.com/200941.git
Embed All Files: show embed
Ruby #
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
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