@sponge = Factory(:user)
let(:event_type) { EventType.where( name: 'visit_site').first
ONE: => false при запуске теста
subject{ Event.new user: @sponge, event_type: event_type, points_earned: event_type.points_value, description: {}}
context 'call #update_user_points when create a event' do
it{should_receive(:update_user_points)}
end
TWO: => true при запуске теста
it 'should call update_user_points after creation' do
event = Event.new user: @sponge, event_type: event_type, points_earned:event_type.points_value, description: {}
event.should_receive(:update_user_points)
event.save
end
Дайте мне несколько советов, пожалуйста: D