Sha256: 128df75b274c192864d7d5eef479bd0e3a4130414d5525d9466635f0c03b2bee

Contents?: true

Size: 725 Bytes

Versions: 3

Compression:

Stored size: 725 Bytes

Contents

require File.dirname(__FILE__) + '/../spec_helper'

describe "Object" do
  it "should respond to to_os" do
    Object.new.respond_to?(:to_os).should == true
  end

  describe "with_options" do
    before(:each) do
      class TestObjClass
        include Dslify
        dsl_methods :b
        
        def initialize(o={})
          set_vars_from_options o
        end
      end
      @obj = TestObjClass.new
    end
    
    describe "contextual running" do
      before(:each) do
        @obj.stub!(:default_options).and_return {}
        @a = @obj.instance_eval { @a = "hello world" }
      end
      it "should have the method meta_eval" do
        @obj.respond_to?(:meta_eval).should == true
      end
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
auser-poolparty-1.2.3 spec/poolparty/core/object_spec.rb
auser-poolparty-1.2.4 spec/poolparty/core/object_spec.rb
auser-poolparty-1.2.7 spec/poolparty/core/object_spec.rb