Sha256: 92cacafb6322998fcfcfae6261adace96d6203b2893eb9472476cf6d7190e585

Contents?: true

Size: 330 Bytes

Versions: 7

Compression:

Stored size: 330 Bytes

Contents

require 'pr/build_from_hash'

describe 'building a form from a hash' do
  let(:form) { Struct.new(:a,:b).new }
  let(:hash) { { "a" => "a", "b" => "b" } }

  let(:builder)  { PR::BuildFromHash.new form }

  it 'sets hash values on form' do
    builder.from hash
    expect(form.a).to eq "a"
    expect(form.b).to eq "b"
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
pr-1.0.0 spec/unit/pr/build_from_hash_spec.rb
pr-0.0.7 spec/unit/pr/build_from_hash_spec.rb
pr-0.0.6 spec/unit/pr/build_from_hash_spec.rb
pr-0.0.5 spec/unit/pr/build_from_hash_spec.rb
pr-0.0.4 spec/unit/pr/build_from_hash_spec.rb
pr-0.0.3 spec/unit/pr/build_from_hash_spec.rb
pr-0.0.2 spec/unit/pr/build_from_hash_spec.rb