Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

An example of using pusher-fake with Cucumber to test a Rails application.

branch: master
README.markdown

pusher-fake-example Build Status Dependency Status

An example of using pusher-fake with Cucumber to test a Rails application.

How-To

1. Use the PusherFake JS for the Pusher JS instance.

<script>
  <% if defined?(PusherFake) %>
    // Test environment.
    //
    // Note: Ensure output is not HTML escaped, such as with the raw helper in Rails.
    var instance = <%= PusherFake.javascript %>;
  <% else %>
    // Other environments, such as production.
    var instance = new Pusher(...);
  <% end %>
</script>

2. Configure and start PusherFake in your Cucumber environment.

require "pusher-fake/cucumber"

3. Enjoy testing your Pusher application!

License

pusher-fake-example uses the MIT license. See LICENSE for more details.

Something went wrong with that request. Please try again.