Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

consertando teste xD

  • Loading branch information...
commit cad70d6c33ba9961a01dc59591155a1641b37583 1 parent 33958ac
@HugoLnx authored
Showing with 7 additions and 2 deletions.
  1. +7 −2 spec/controladores/observador_spec.rb
View
9 spec/controladores/observador_spec.rb
@@ -5,9 +5,12 @@ module Controladores
describe 'Um Observador' do
it 'deveria ser instanciavel' do
janela = mock :janela
- janela.stub!(:componentes).and_return({:btn_gerar => mock(:btn_gerar)})
+ janela.stub!(:componentes).and_return({:btn_gerar => mock(:btn_gerar),
+ :timer => mock(:timer),
+ :barra_menu => mock(:barra_menu)})
janela.componentes[:btn_gerar].stub!(:add_action_listener).with any_args
janela.componentes[:timer].stub!(:add_action_listener).with any_args
+ janela.componentes[:barra_menu].stub!(:add_action_listener).with any_args
fabrica_ondas = mock :fabrica_ondas
fabrica_ondas.stub!(:fabricar).and_return(mock(:onda))
lambda{
@@ -21,10 +24,12 @@ module Controladores
@janela = mock :janela
@janela.stub!(:componentes).and_return({:btn_gerar => mock(:btn_gerar),
:timer => mock(:timer),
- :pnl_des => mock(:pnl_des)})
+ :pnl_des => mock(:pnl_des),
+ :barra_menu => mock(:barra_menu)})
@evento = mock(:evento)
@janela.componentes[:btn_gerar].stub!(:add_action_listener).with any_args
@janela.componentes[:timer].stub!(:add_action_listener).with any_args
+ @janela.componentes[:barra_menu].stub!(:add_action_listener).with any_args
@fabrica_ondas = mock :fabrica_ondas
@observador = Observador.new :janela => @janela,
:fabrica_ondas => @fabrica_ondas
Please sign in to comment.
Something went wrong with that request. Please try again.