Sha256: 2ef802c7988c87d127460e39ecf1ba6b51924ac800d62e74b4590bee717db1b1

Contents?: true

Size: 773 Bytes

Versions: 2

Compression:

Stored size: 773 Bytes

Contents

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

describe "Hash" do
  it "should preserve the contents of the original hash when safe_merge'ing" do
    a = {:a => "10", :b => "20"}
    b = {:b => "30", :c => "40"}
    a.safe_merge(b).should == {:a => "10", :b => "20", :c => "40"}
  end
  it "should preserve the contents of the original hash when safe_merge!'ing" do
    a = {:a => "10", :b => "20"}
    b = {:b => "30", :c => "40"}
    a.safe_merge!(b)
    a.should == {:a => "10", :b => "20", :c => "40"}
  end
end
describe "String" do
  before(:each) do
    @str =<<-EOS
      echo 'hi'
      puts 'hi'
    EOS
  end
  it "should be able to convert a big string with \n to a runnable string" do
    @str.runnable.should == "echo 'hi' &&       puts 'hi'"
  end
end

Version data entries

2 entries across 2 versions & 2 rubygems

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