Sha256: a2e20ebff517501436adc0923b8a84ca2fe01300c9770f0a95e5111377889a48

Contents?: true

Size: 576 Bytes

Versions: 95

Compression:

Stored size: 576 Bytes

Contents

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

describe "Kernel extensions" do
  before(:each) do
    @obj = Object.new
  end
  it "should eval the string into time" do
    @obj.should_receive(:sleep).once.with(10.seconds).and_return true
    @obj.wait "10.seconds"
  end
end
describe "Object extensions" do
  before(:each) do
    @klass = Object.new
    @klass.instance_eval <<-EOE
      def hello
        puts "hello"
      end
    EOE
  end
  it "should be able to get a list of the defined methods on the object" do
    @klass.my_methods.should == ["hello"]
  end
end

Version data entries

95 entries across 95 versions & 3 rubygems

Version Path
auser-poolparty-0.2.15 spec/poolparty/core/kernel_spec.rb
auser-poolparty-0.2.16 spec/poolparty/core/kernel_spec.rb
auser-poolparty-0.2.20 spec/poolparty/core/kernel_spec.rb
auser-poolparty-0.2.21 spec/poolparty/core/kernel_spec.rb
auser-poolparty-0.2.22 spec/poolparty/core/kernel_spec.rb
auser-poolparty-0.2.23 spec/poolparty/core/kernel_spec.rb
auser-poolparty-0.2.24 spec/poolparty/core/kernel_spec.rb
auser-poolparty-0.2.25 spec/poolparty/core/kernel_spec.rb
auser-poolparty-0.2.26 spec/poolparty/core/kernel_spec.rb
auser-poolparty-0.2.3 spec/poolparty/core/kernel_spec.rb
auser-poolparty-0.2.35 spec/poolparty/core/kernel_spec.rb
auser-poolparty-0.2.36 spec/poolparty/core/kernel_spec.rb
auser-poolparty-0.2.37 spec/poolparty/core/kernel_spec.rb
auser-poolparty-0.2.38 spec/poolparty/core/kernel_spec.rb
auser-poolparty-0.2.39 spec/poolparty/core/kernel_spec.rb
auser-poolparty-0.2.4 spec/poolparty/core/kernel_spec.rb
auser-poolparty-0.2.40 spec/poolparty/core/kernel_spec.rb
auser-poolparty-0.2.41 spec/poolparty/core/kernel_spec.rb
auser-poolparty-0.2.42 spec/poolparty/core/kernel_spec.rb
auser-poolparty-0.2.44 spec/poolparty/core/kernel_spec.rb