sandro / ephemeral_response Goto Github PK
View Code? Open in Web Editor NEWAutomatic recording, replaying, and expiry of web responses.
License: MIT License
Automatic recording, replaying, and expiry of web responses.
License: MIT License
Let's say you just need to plug ephemeral_response in your current test set and you can assume monkey patching and a usage global variable, have a look to,
https://gist.github.com/hsanjuan/5966414
As I say dirty and probably over complicated, but it might come handy.
Hi,
When I change the registered identifier, it seems that the value of request.body is always nil, even when I am posting lots of data.
How do I get at the real value of the request body to use it as part of the request identifier?
Here is the configuration code I'm using:
Spec::Runner.configure do |config|
config.include Capybara
config.before(:suite) do
EphemeralResponse.activate
EphemeralResponse.configure do |config|
config.register('auristechnology.com') do |request|
"#{request.uri.host}#{request.method}#{request.path}#{request.body.to_s.gsub( /[\d:]+</reference-id>/, '' )}"
end
end
end
config.after(:suite) do
EphemeralResponse.deactivate
end
end
I'm testing image uploading which, I guess, isn't supported by ephemeral_response? I'd sure like it to be :)
Stack trace:
TypeError: can't dump File /Users/mikker/.rvm/gems/ruby-1.9.2-p0@3frames/gems/ephemeral_response-0.3.2/lib/ephemeral_response/fixture.rb:120:in `dump' /Users/mikker/.rvm/gems/ruby-1.9.2-p0@3frames/gems/ephemeral_response-0.3.2/lib/ephemeral_response/fixture.rb:120:in `deep_dup' /Users/mikker/.rvm/gems/ruby-1.9.2-p0@3frames/gems/ephemeral_response-0.3.2/lib/ephemeral_response/fixture.rb:56:in `initialize' /Users/mikker/.rvm/gems/ruby-1.9.2-p0@3frames/gems/ephemeral_response-0.3.2/lib/ephemeral_response/fixture.rb:15:in `new' /Users/mikker/.rvm/gems/ruby-1.9.2-p0@3frames/gems/ephemeral_response-0.3.2/lib/ephemeral_response/fixture.rb:15:in `find' /Users/mikker/.rvm/gems/ruby-1.9.2-p0@3frames/gems/ephemeral_response-0.3.2/lib/ephemeral_response/fixture.rb:31:in `find_or_initialize' /Users/mikker/.rvm/gems/ruby-1.9.2-p0@3frames/gems/ephemeral_response-0.3.2/lib/ephemeral_response/fixture.rb:43:in `respond_to' /Users/mikker/.rvm/gems/ruby-1.9.2-p0@3frames/gems/ephemeral_response-0.3.2/lib/ephemeral_response/net_http.rb:26:in `request' /Users/mikker/.rvm/gems/ruby-1.9.2-p0@3frames/gems/aws-s3-0.6.2/lib/aws/s3/connection.rb:45:in `block in request'
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.