Last active
August 29, 2015 14:02
-
-
Save heathd/ca7cdca66e4545c952a0 to your computer and use it in GitHub Desktop.
Ruby2Ruby destroys its input
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
source 'http://rubygems.org' | |
gem 'ruby2ruby' | |
gem 'rspec' |
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
~/ca7cdca66e4545c952a0(master)$ be rspec ruby2ruby_should_not_destroy_its_input_spec.rb | |
F | |
Failures: | |
1) Ruby2Ruby is non-destructive | |
Failure/Error: expect(sexp).to eq(s(:call, s(:call, nil, :a), :b)) | |
expected: s(:call, s(:call, nil, :a), :b) | |
got: s() | |
(compared using ==) | |
Diff: | |
@@ -1,2 +1,2 @@ | |
-[:call, [:call, nil, :a], :b] | |
+[] | |
# ./ruby2ruby_should_not_destroy_its_input_spec.rb:8:in `block (2 levels) in <top (required)>' | |
Finished in 0.00212 seconds (files took 0.0897 seconds to load) | |
1 example, 1 failure | |
Failed examples: | |
rspec ./ruby2ruby_should_not_destroy_its_input_spec.rb:4 # Ruby2Ruby is non-destructive |
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 'ruby2ruby' | |
describe "Ruby2Ruby" do | |
it "is non-destructive" do | |
sexp = s(:call, s(:call, nil, :a), :b) | |
Ruby2Ruby.new.process(sexp) | |
expect(sexp).to eq(s(:call, s(:call, nil, :a), :b)) | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment