Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- module SkeptiSpec
- def get_in_thurr(&block)
- instance_eval(&block)
- end
- end
- require 'rubygems'
- require 'spec'
- describe "private methods" do
- attr_reader :klass, :object
- before(:each) do
- @klass = Class.new do
- include SkeptiSpec
- private
- def foo; :foo end
- def bar; :bar end
- end
- @object = @klass.new
- end
- it "gets foo" do
- object.get_in_thurr { foo }.should == :foo
- end
- it "gets bar" do
- object.get_in_thurr { bar }.should == :bar
- end
- end
Add Comment
Please, Sign In to add comment