backchannel-chatter's People
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
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google โค๏ธ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.