wrong 0.6.3 → 0.7.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (42) hide show
  1. data/README.markdown +10 -7
  2. data/lib/wrong.rb +1 -0
  3. data/lib/wrong/adapters/rspec.rb +4 -0
  4. data/lib/wrong/assert.rb +1 -2
  5. data/lib/wrong/chunk.rb +5 -170
  6. data/lib/wrong/close_to.rb +7 -1
  7. data/lib/wrong/config.rb +3 -3
  8. data/lib/wrong/d.rb +2 -1
  9. data/lib/wrong/failure_message.rb +109 -7
  10. data/lib/wrong/message/string_comparison.rb +1 -1
  11. data/lib/wrong/sexp_ext.rb +2 -1
  12. data/lib/wrong/terminal.rb +43 -0
  13. data/lib/wrong/version.rb +1 -1
  14. data/test/adapters/railsapp/app/controllers/application_controller.rb +3 -0
  15. data/test/adapters/railsapp/app/helpers/application_helper.rb +2 -0
  16. data/test/adapters/railsapp/config/application.rb +54 -0
  17. data/test/adapters/railsapp/config/boot.rb +6 -0
  18. data/test/adapters/railsapp/config/environment.rb +5 -0
  19. data/test/adapters/railsapp/config/environments/development.rb +30 -0
  20. data/test/adapters/railsapp/config/environments/production.rb +60 -0
  21. data/test/adapters/railsapp/config/environments/test.rb +42 -0
  22. data/test/adapters/railsapp/config/initializers/backtrace_silencers.rb +7 -0
  23. data/test/adapters/railsapp/config/initializers/inflections.rb +10 -0
  24. data/test/adapters/railsapp/config/initializers/mime_types.rb +5 -0
  25. data/test/adapters/railsapp/config/initializers/secret_token.rb +7 -0
  26. data/test/adapters/railsapp/config/initializers/session_store.rb +8 -0
  27. data/test/adapters/railsapp/config/initializers/wrap_parameters.rb +14 -0
  28. data/test/adapters/railsapp/config/routes.rb +58 -0
  29. data/test/adapters/railsapp/db/seeds.rb +7 -0
  30. data/test/adapters/railsapp/spec/spec_helper.rb +33 -0
  31. data/test/adapters/railsapp/spec/wrong_spec.rb +8 -0
  32. data/test/adapters/rspec_rails_test.rb +4 -4
  33. data/test/adapters/rspec_test.rb +2 -2
  34. data/test/assert_advanced_test.rb +9 -1
  35. data/test/chunk_test.rb +0 -200
  36. data/test/close_to_test.rb +34 -2
  37. data/test/d_test.rb +2 -2
  38. data/test/eventually_test.rb +27 -34
  39. data/test/failure_message_test.rb +212 -13
  40. data/test/test_helper.rb +2 -2
  41. metadata +47 -56
  42. data/lib/wrong/ruby2ruby_patch.rb +0 -37
@@ -1,37 +0,0 @@
1
- class ::Ruby2Ruby < ::SexpProcessor
2
- # see http://gist.github.com/321038
3
- # Monkey-patch to have Ruby2Ruby#translate with r2r >= 1.2.3, from
4
- # http://seattlerb.rubyforge.org/svn/ruby2ruby/1.2.2/lib/ruby2ruby.rb
5
- def self.translate(klass_or_str, method = nil)
6
- sexp = ParseTree.translate(klass_or_str, method)
7
- unifier = Unifier.new
8
- unifier.processors.each do |p|
9
- p.unsupported.delete :cfunc # HACK
10
- end
11
- sexp = unifier.process(sexp)
12
- self.new.process(sexp)
13
- end
14
-
15
- #sconover - 7/2010 - monkey-patch
16
- #{1=>2}=={1=>2}
17
- #The right side was having its braces cut off because of
18
- #special handling of hashes within arglists within the seattlerb code.
19
- #I tried to fork r2r and add a test, but a lot of other tests
20
- #broke, and I just dont understand the test in ruby2ruby.
21
- #So I'm emailing the author...
22
- def process_hash(exp)
23
- result = []
24
- until exp.empty?
25
- lhs = process(exp.shift)
26
- rhs = exp.shift
27
- t = rhs.first
28
- rhs = process rhs
29
- rhs = "(#{rhs})" unless [:lit, :str].include? t # TODO: verify better!
30
-
31
- result << "#{lhs} => #{rhs}"
32
- end
33
-
34
- return "{ #{result.join(', ')} }"
35
- end
36
-
37
- end