Sha256: 149a841fda492ec1528998d4a8006d1a1c9a101035edb8fab7af3a663b34d745
Contents?: true
Size: 557 Bytes
Versions: 4
Compression:
Stored size: 557 Bytes
Contents
require File.expand_path(File.dirname(__FILE__) + '/../spec_helper') class ParamConstructorTest param_constructor attr_accessor :first_name, :last_name end describe "param_constructor" do it "should let the object be instantiated with a hash" do test = ParamConstructorTest.new(first_name: "John", last_name: "Galt") test.first_name.must_equal "John" test.last_name.must_equal "Galt" end it "should allow the object to be instantiated with no params" do test = ParamConstructorTest.new # should not throw an error end end
Version data entries
4 entries across 4 versions & 2 rubygems