Guest User

Untitled

a guest
Feb 20th, 2018
63
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.52 KB | None | 0 0
  1. module SkeptiSpec
  2. def get_in_thurr(&block)
  3. instance_eval(&block)
  4. end
  5. end
  6.  
  7. require 'rubygems'
  8. require 'spec'
  9.  
  10. describe "private methods" do
  11. attr_reader :klass, :object
  12.  
  13. before(:each) do
  14. @klass = Class.new do
  15. include SkeptiSpec
  16. private
  17. def foo; :foo end
  18. def bar; :bar end
  19. end
  20. @object = @klass.new
  21. end
  22.  
  23. it "gets foo" do
  24. object.get_in_thurr { foo }.should == :foo
  25. end
  26.  
  27. it "gets bar" do
  28. object.get_in_thurr { bar }.should == :bar
  29. end
  30. end
Add Comment
Please, Sign In to add comment