Sha256: 0c9db77946e5bf7c6c2723f903f76207bef6826522642fecb61850837b294caf

Contents?: true

Size: 350 Bytes

Versions: 2

Compression:

Stored size: 350 Bytes

Contents

require 'spec_helper'
require 'shared/nested_attribute_examples'

describe Granite::Form::ActiveRecord::NestedAttributes do
  before do
    stub_class(:user, ActiveRecord::Base) do
      embeds_one :profile
      embeds_many :projects

      accepts_nested_attributes_for :profile, :projects
    end
  end

  include_examples 'nested attributes'
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
granite-form-0.1.1 spec/lib/granite/form/active_record/nested_attributes_spec.rb
granite-form-0.1.0 spec/lib/granite/form/active_record/nested_attributes_spec.rb