Skip to content

Instantly share code, notes, and snippets.

@ch1c0t
Created December 21, 2016 20:29
Show Gist options
  • Save ch1c0t/b47847200aa58f8cb60f91115b58bb84 to your computer and use it in GitHub Desktop.
Save ch1c0t/b47847200aa58f8cb60f91115b58bb84 to your computer and use it in GitHub Desktop.
- rspec:0:./spec/http_spec.rb:8/Hobby::JSON #<Hobby::Test:0x00000002f60818> works
[0/1897]
evil:Hobby::JSON.included:/home/ch1c0t/sources/ruby/hobby-json/lib/hobby/json.rb:6:581f7
@@ -1,5 +1,5 @@
-def self.included(app)
+def self.included
app.use(Rack::ContentType, "application/json")
app.response = Response
end
-----------------------
Hobby::JSON#json:/home/ch1c0t/sources/ruby/hobby-json/lib/hobby/json.rb:17
- rspec:0:./spec/http_spec.rb:8/Hobby::JSON #<Hobby::Test:0x00000002f60818> works
evil:Hobby::JSON#json:/home/ch1c0t/sources/ruby/hobby-json/lib/hobby/json.rb:17:9d5dd
@@ -1,4 +1,4 @@
def json
- @json ||= ::JSON.parse(request.body.read)
+ raise
end
-----------------------
Mutant configuration:
Matcher: #<Mutant::Matcher::Config match_expressions: [Hobby::JSON]>
Integration: Mutant::Integration::Rspec
Jobs: 2
Includes: []
Requires: []
Subjects: 2
Mutations: 46
Results: 46
Kills: 44
Alive: 2
Runtime: 16.11s
Killtime: 26.69s
Overhead: -39.65%
Mutations/s: 2.86
Coverage: 95.65%
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment