Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also compare across forks.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also compare across forks.
  • 5 commits
  • 7 files changed
  • 4 commit comments
  • 1 contributor
View
16 Gemfile
@@ -1,13 +1,9 @@
source :gemcutter
-gem "ruby_parser"
-gem "ruby2ruby"
-gem "ParseTree", :platforms => :ruby # C Ruby (MRI) or Rubinius, but NOT Windows or JRuby
+gemspec
-gem "minitest"
-gem "test-unit"
-gem "rspec", '~> 1'
-
-gem "predicated", '~> 0.2.1'
-gem "diff"
-gem "diff-lcs"
+group :test do
+ gem "minitest"
+ gem "test-unit"
+ gem "rspec", '~> 1'
+end
View
26 Gemfile.lock
@@ -1,12 +1,16 @@
+PATH
+ remote: .
+ specs:
+ wrong (0.3.3)
+ diff (>= 0.3.6)
+ diff-lcs (>= 1.1.2)
+ predicated (~> 0.2.1)
+ ruby2ruby (>= 1.2.4)
+ ruby_parser (>= 2.0.4)
+
GEM
remote: http://rubygems.org/
specs:
- ParseTree (3.0.6)
- RubyInline (>= 3.7.0)
- sexp_processor (>= 3.0.0)
- RubyInline (3.8.6)
- ZenTest (~> 4.3)
- ZenTest (4.4.0)
diff (0.3.6)
diff-lcs (1.1.2)
minitest (1.7.1)
@@ -25,12 +29,12 @@ PLATFORMS
ruby
DEPENDENCIES
- ParseTree
- diff
- diff-lcs
+ diff (>= 0.3.6)
+ diff-lcs (>= 1.1.2)
minitest
predicated (~> 0.2.1)
rspec (~> 1)
- ruby2ruby
- ruby_parser
+ ruby2ruby (>= 1.2.4)
+ ruby_parser (>= 2.0.4)
test-unit
+ wrong!
View
39 lib/predicated/lib/predicated/sexp_patch.rb
@@ -1,39 +0,0 @@
-
-
-#see http://gist.github.com/321038
-# # Monkey-patch to have Ruby2Ruby#translate with r2r >= 1.2.3, from
-# # http://seattlerb.rubyforge.org/svn/ruby2ruby/1.2.2/lib/ruby2ruby.rb
-class ::Ruby2Ruby < ::SexpProcessor
- def self.translate(klass_or_str, method = nil)
- sexp = ParseTree.translate(klass_or_str, method)
- unifier = Unifier.new
- unifier.processors.each do |p|
- p.unsupported.delete :cfunc # HACK
- end
- sexp = unifier.process(sexp)
- self.new.process(sexp)
- end
-
- #sconover - 7/2010 - monkey-patch
- #{1=>2}=={1=>2}
- #The right side was having its braces cut off because of
- #special handling of hashes within arglists within the seattlerb code.
- #I tried to fork r2r and add a test, but a lot of other tests
- #broke, and I just dont understand the test in ruby2ruby.
- #So I'm emailing the author...
- def process_hash(exp)
- result = []
- until exp.empty?
- lhs = process(exp.shift)
- rhs = exp.shift
- t = rhs.first
- rhs = process rhs
- rhs = "(#{rhs})" unless [:lit, :str].include? t # TODO: verify better!
-
- result << "#{lhs} => #{rhs}"
- end
-
- return "{ #{result.join(', ')} }"
- end
-
-end
View
8 test/assert_test.rb
@@ -100,7 +100,9 @@ def assert_many(*procs)
assert { e.message =~ /x is 10/ }
end
- xit "can parse a here doc defined inside the block" do
+ it "can parse a here doc defined inside the block" do
+ skip
+
# todo: test in Chunk too
assert { "123\n456" == <<-TEXT
123
@@ -109,7 +111,9 @@ def assert_many(*procs)
}
end
- xit "can parse a here doc defined outside the block" do
+ it "can parse a here doc defined outside the block" do
+ skip
+
# todo: test in Chunk too
assert { "123\n456" == <<-TEXT }
123
View
4 test/message/string_diff_test.rb
@@ -74,7 +74,9 @@ def assert_string_diff_message(first_string, second_string, str)
end
- xit "elides really long matching sections" do
+ it "elides really long matching sections" do
+ skip
+
left = "x"*100 + "ab" + "y"*100 + "AB" + "z"*100
right = "x"*100 + "acc" + "y"*100 + "ACC" + "z"*100
View
32 test/test_helper.rb
@@ -1,14 +1,7 @@
-dir = File.dirname(__FILE__)
-$LOAD_PATH.unshift "#{dir}/../lib"
-
-predicated_project_dir = File.expand_path("../predicated")
-if File.exist?(predicated_project_dir) # if predicated project is a sibling of this project
- puts "using predicated from #{predicated_project_dir}"
- $LOAD_PATH.unshift "#{predicated_project_dir}/lib"
- require "predicated"
-end
-
require "rubygems"
+require "bundler"
+Bundler.require(:test)
+
require "minitest/spec"
require "minitest/unit"
require "pp"
@@ -24,25 +17,6 @@ def get_error
error
end
-class MiniTest::Unit::TestCase
-end
-
-module Kernel
- def xdescribe(str)
- puts "x'd out describe \"#{str}\""
- end
-end
-
-class MiniTest::Spec
- include MiniTest::Assertions
-
- class << self
- def xit(str)
- puts "x'd out test \"#{str}\""
- end
- end
-end
-
# dummy class for use by tests
class Color
attr_reader :name
View
3  wrong.gemspec
@@ -23,8 +23,7 @@ in Ruby, Wrong can make a sensible failure message out of it.
s.has_rdoc = true
s.extra_rdoc_files = %w[README.markdown]
- s.add_dependency "predicated", ">= 0.2.1"
- s.add_dependency "ParseTree", ">= 3.0.5"
+ s.add_dependency "predicated", "~> 0.2.1"
s.add_dependency "ruby_parser", ">= 2.0.4"
s.add_dependency "ruby2ruby", ">= 1.2.4"

Showing you all comments on commits in this comparison.

@alexch
Collaborator

"xit" is a relic from long ago when Steve and I would focus on a jUnit test by replacing "test" with "xtest" and then renaming a single test back to "test". I like "skip" and "pending" much better. :-)

@alexch
Collaborator

I think we should discuss this -- Steve and I have been doing simultaneous development on both projects and this would seem to force us to do a predicated release (or at least rake install) after an edit so it would slow things down. Which might be a good idea but deserves discussion.

@jfirebaugh
Collaborator

Yeah I figured that's what it's for; feel free to drop this commit in your pull. It tripped me up because I had an outdated version of predicated as a sibling.

@alexch
Collaborator

Hence the warning :-) -- but yeah, maybe it could check the Predicated version number to avoid that?

Something went wrong with that request. Please try again.