Forums | Admin

Discussion Forums: open-discussion

Start New Thread Start New Thread

 

By: Corbin Hoenes
Integration Testing/ Rspec [ reply ]  
2007-10-17 04:47
Has anyone done any Rspec or integration testing for Shooting Star based applications? I am wondering if there is a way to test my controllers.

They are patterned after the chat application so they look at lot like this:

def create
@chat = Chat.create(params[:chat])
# create HTML string to show a message
content = render_component_as_string :action => 'show', :id => @chat.id
# create JS string to add a message on list
javascript = render_to_string :update do |page|
page.insert_html :top, 'chat-list', content
end
# push JS to clients listening `shot_chat' channel
Meteor.shoot 'shot_chat', javascript
# nothing is rendered
render :nothing => true
end

How can I assert that the javascript coming back?