Sha256: 0b0e99bf0ce596a1778d65db9743f2b2249eedfaa7c1e81e4f2b55c57bdd3f33

Contents?: true

Size: 565 Bytes

Versions: 2

Compression:

Stored size: 565 Bytes

Contents

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

describe "Kernel extensions" do
  before(:each) do
    @host = Master.new
  end
  it "should eval the string into time" do
    @host.should_receive(:sleep).once.and_return true
    @host.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

2 entries across 2 versions & 2 rubygems

Version Path
auser-poolparty-0.1.2 spec/lib/core/kernel_spec.rb
jtzemp-poolparty-0.1.2 spec/lib/core/kernel_spec.rb