Created
June 10, 2012 15:09
-
-
Save moonglum/2906127 to your computer and use it in GitHub Desktop.
Heckle with different ruby2ruby versions
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
☹ bundle update | |
Fetching gem metadata from http://rubygems.org/....... | |
Using ZenTest (4.8.1) | |
Using RubyInline (3.9.0) | |
Using sexp_processor (3.2.0) | |
Using ParseTree (3.0.9) | |
Using ruby2ruby (1.2.2) | |
Using heckle (1.4.3) | |
Using bundler (1.1.4) | |
Your bundle is updated! Use `bundle show [gemname]` to see where a bundled gem is installed. | |
☺ bundle exec heckle Greeter | |
Timeout set to 5 seconds. | |
Initial tests pass. Let's rumble. | |
********************************************************************** | |
*** Greeter#greet loaded with 7 possible mutations | |
********************************************************************** | |
7 mutations remaining... | |
6 mutations remaining... | |
5 mutations remaining... | |
4 mutations remaining... | |
3 mutations remaining... | |
2 mutations remaining... | |
1 mutations remaining... | |
The following mutations didn't cause test failures: | |
--- original | |
+++ mutation | |
def greet | |
- raise("here") if (rand > 1) | |
+ raise("here") if (rand > 12) | |
"Hi #{@person}!" | |
end | |
--- original | |
+++ mutation | |
def greet | |
- raise("here") if (rand > 1) | |
+ raise("here") if nil | |
"Hi #{@person}!" | |
end | |
--- original | |
+++ mutation | |
def greet | |
- raise("here") if (rand > 1) | |
+ if (rand > 1) then | |
+ raise("\0349=\020xl5$\eA$\bM,Rh:7\bg00?#\v\025\016F$& V<\01780\020`\e(FYQ\023IK") | |
+ end | |
"Hi #{@person}!" | |
end | |
--- original | |
+++ mutation | |
def greet | |
- raise("here") if (rand > 1) | |
+ nil if (rand > 1) | |
"Hi #{@person}!" | |
end | |
Heckle Results: | |
Passed : 0 | |
Failed : 1 | |
Thick Skin: 0 | |
Improve the tests and try again. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
☹ bundle update | |
Fetching gem metadata from http://rubygems.org/....... | |
Using ZenTest (4.8.1) | |
Using RubyInline (3.9.0) | |
Using sexp_processor (3.2.0) | |
Using ParseTree (3.0.9) | |
Using ruby_parser (2.3.1) | |
Using ruby2ruby (1.3.1) | |
Using heckle (1.4.3) | |
Using bundler (1.1.4) | |
☺ bundle exec heckle Greeter | |
Timeout set to 5 seconds. | |
Initial tests pass. Let's rumble. | |
********************************************************************** | |
*** Greeter#greet loaded with 7 possible mutations | |
********************************************************************** | |
7 mutations remaining... | |
6 mutations remaining... | |
/Users/moonglum/.rvm/gems/ruby-1.8.7-p358@heckling/gems/heckle-1.4.3/bin/../lib/heckle.rb:603:in `current_code': undefined method `translate' for Ruby2Ruby:Class (NoMethodError) | |
from /Users/moonglum/.rvm/gems/ruby-1.8.7-p358@heckling/gems/heckle-1.4.3/bin/../lib/heckle.rb:202:in `record_passing_mutation' | |
from /Users/moonglum/.rvm/gems/ruby-1.8.7-p358@heckling/gems/heckle-1.4.3/bin/../lib/heckle.rb:149:in `run_tests' | |
from /Users/moonglum/.rvm/gems/ruby-1.8.7-p358@heckling/gems/heckle-1.4.3/bin/../lib/heckle.rb:173:in `validate' | |
from /Users/moonglum/.rvm/rubies/ruby-1.8.7-p358/lib/ruby/1.8/timeout.rb:67:in `timeout' | |
from /Users/moonglum/.rvm/rubies/ruby-1.8.7-p358/lib/ruby/1.8/timeout.rb:101:in `timeout' | |
from /Users/moonglum/.rvm/gems/ruby-1.8.7-p358@heckling/gems/heckle-1.4.3/bin/../lib/heckle.rb:173:in `validate' | |
from /Users/moonglum/.rvm/gems/ruby-1.8.7-p358@heckling/gems/heckle-1.4.3/bin/../lib/test_unit_heckler.rb:80:in `validate' | |
from /Users/moonglum/.rvm/gems/ruby-1.8.7-p358@heckling/gems/heckle-1.4.3/bin/../lib/test_unit_heckler.rb:79:in `each' | |
from /Users/moonglum/.rvm/gems/ruby-1.8.7-p358@heckling/gems/heckle-1.4.3/bin/../lib/test_unit_heckler.rb:79:in `validate' | |
from /Users/moonglum/.rvm/gems/ruby-1.8.7-p358@heckling/gems/heckle-1.4.3/bin/heckle:95 | |
from /Users/moonglum/.rvm/gems/ruby-1.8.7-p358@heckling/bin/heckle:19:in `load' | |
from /Users/moonglum/.rvm/gems/ruby-1.8.7-p358@heckling/bin/heckle:19 | |
from /Users/moonglum/.rvm/gems/ruby-1.8.7-p358@heckling/bin/ruby_noexec_wrapper:14 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Greeter | |
def initialize(person) | |
@person = person | |
end | |
def greet | |
if rand > 1; raise 'here' end | |
"Hi #{@person}!" | |
end | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require "test/unit" | |
require "./lib/greeter.rb" | |
class TestGreeter < Test::Unit::TestCase | |
def test_greet | |
@greeter = Greeter.new('Lucas') | |
assert_equal 'Hi Lucas!', @greeter.greet | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment