Guest User

Untitled

a guest
Apr 20th, 2018
53
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.67 KB | None | 0 0
  1. ## Spec output [plain_text]
  2. [Sat Apr 12 - 00:36:03] [elliottcable @ bishop] [~/Documents/Work/Code/rdie/]
  3. -- rake aok
  4. (in /Users/elliottcable/Documents/Work/Code/rdie)
  5. ./spec/lib/classist_spec.rb:30: warning: parenthesize argument(s) for future version
  6.  
  7. Exceptions
  8. - should have a not_found method
  9. - should have a not_acceptable method
  10.  
  11. Classist
  12. - should allow one to attach functionality to be run on syntactically sugary class creation (FAILED - 1)
  13.  
  14. Core extensions: Object
  15. - should respond to #on_execute
  16. - should run the on_execute block only if __FILE__ and $0 are the same
  17.  
  18. Core extensions: Symbol
  19. - should respond to #/
  20. - should be able to join two symbols into a string
  21. - should be able to join a symbol and a string into a string
  22. - should work the same as String#/ from merb-core
  23.  
  24. D (the die class)
  25. - should be able to roll standard RPG gaming die
  26. - should be able to roll d00, i.e. d100
  27. - should be able to do basic die math
  28. - should explode if you send a non-mathematical method to a die
  29. - should be min-able
  30. - should be max-able
  31. - should accept chaining of arbitrary methods
  32.  
  33. 1)
  34. 'Classist should allow one to attach functionality to be run on syntactically sugary class creation' FAILED
  35. expected [ClassistSpecHelper::Foo, ClassistSpecHelper::Bar], got [ClassistSpecHelper::Foo, ClassistSpecHelper::Foo, ClassistSpecHelper::Bar, ClassistSpecHelper::Bar]
  36. ./spec/lib/classist_spec.rb:27:
  37.  
  38. Finished in 0.060514 seconds
  39.  
  40. 16 examples, 1 failure
  41. rake aborted!
  42. Command ruby -I"lib:server/lib" -S rcov --exclude lib\/spec,bin\/spec,config\/boot.rb -o "meta/coverage" "/usr/local/lib/ruby/gems/1.8/gems/rspec-1.1.3/bin/spec" -- "spec/controllers/exceptions_spec.rb" "spec/lib/classist_spec.rb" "spec/lib/core_ext/object_spec.rb" "spec/lib/core_ext/symbol_spec.rb" "spec/lib/d_spec.rb" --format specdoc --colour failed
  43.  
  44. (See full trace by running task with --trace)
  45.  
  46. ## Relevant specfile
  47. require File.join( File.dirname(__FILE__), "..", "spec_helper" )
  48. require 'classist'
  49.  
  50. describe Classist do
  51. before(:all) do
  52. @spec_helper = lambda do
  53. module ClassistSpecHelper
  54. include Classist
  55.  
  56. Classized = []
  57. def self.classize(klass)
  58. Classized << klass
  59. end
  60. end
  61. end
  62. end
  63. before(:each) do
  64. @spec_helper.call
  65. end
  66.  
  67. it "should allow one to attach functionality to be run on syntactically sugary class creation" do
  68. module ClassistSpecHelper
  69. class Foo; end
  70. class Bar; end
  71. end
  72.  
  73. ClassistSpecHelper::Classized.should be [
  74. ClassistSpecHelper::Foo,
  75. ClassistSpecHelper::Bar
  76. ]
  77. end
  78.  
  79. after(:each) do
  80. Object.const_remove :ClassistSpecHelper
  81. end
  82. end
Add Comment
Please, Sign In to add comment