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?
|