Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to test chat application in Ruby on Rails?

What would be the best way to implement integration test for chat application?

The problem is that I don't know how to implement two user behavior without stubbing and mocking everything.

How would you implement these steps?

Given I have two users "joe" and "bob" logged in
When "joe" send "Hello!" message to "bob"
Then "bob" should see "Hello!"

What is the best way to test Ajaxy application with Cucumber?

How to test two users logged in at the same time?

like image 943
Jakub Arnold Avatar asked Nov 14 '22 14:11

Jakub Arnold


1 Answers

If you want to really test JS that way you are going to need to run these tests with a real browser process.

Have a look at http://seleniumhq.org/ and https://github.com/brynary/webrat/wiki/selenium

like image 91
Bitterzoet Avatar answered Nov 24 '22 00:11

Bitterzoet