Giter VIP home page Giter VIP logo

backchannel-chatter's People

Contributors

kareemgrant avatar

Watchers

 avatar

backchannel-chatter's Issues

Need help figuring out how to test my Faye implementation

The app now supports asynchronous communication, but my request specs aren't working - webmock provides me with a clue, but I'm not sure where to go from there:

Failure/Error: click_button "Send"
WebMock::NetConnectNotAllowedError:
Real HTTP connections are disabled. Unregistered request: POST http://localhost:9292/faye with body 'message=%7B%22channel%22%3A%22%2Ftracks%2F2%22%2C%22data%22%3A%7B%22channel%22%3A%22%2Ftracks%2F2%22%2C%22data%22%3A%7B%22message%22%3A%7B%22content%22%3A%22What%27s+good%21%21%21%22%2C%22created_at%22%3A%222013-06-16T19%3A57%3A30Z%22%2C%22id%22%3A1%2C%22track_id%22%3A2%2C%22updated_at%22%3A%222013-06-16T19%3A57%3A30Z%22%7D%7D%7D%2C%22ext%22%3A%7B%22private_pub_token%22%3A%22secret%22%7D%7D' with headers {'Accept'=>'/', 'Content-Type'=>'application/x-www-form-urlencoded', 'User-Agent'=>'Ruby'}

   You can stub this request with the following snippet:

   stub_request(:post, "http://localhost:9292/faye").
     with(:body => {"message"=>"{\"channel\":\"/tracks/2\",\"data\":{\"channel\":\"/tracks/2\",\"data\":{\"message\":{\"content\":\"What's good!!!\",\"created_at\":\"2013-06-16T19:57:30Z\",\"id\":1,\"track_id\":2,\"updated_at\":\"2013-06-16T19:57:30Z\"}}},\"ext\":{\"private_pub_token\":\"secret\"}}"},
          :headers => {'Accept'=>'*/*', 'Content-Type'=>'application/x-www-form-urlencoded', 'User-Agent'=>'Ruby'}).
     to_return(:status => 200, :body => "", :headers => {})

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.