Sha256: a66e7f32c66c2fe8da498012d9568b51705838a1c408b2d8b27610b1f8146093
Contents?: true
Size: 860 Bytes
Versions: 41
Compression:
Stored size: 860 Bytes
Contents
require 'spec_helper' describe ActiveFedora::Base do describe "active model methods" do class BarHistory < ActiveFedora::Base property :fubar, predicate: ::RDF::URI('http://example.com/fubar'), multiple: false property :duck, predicate: ::RDF::URI('http://example.com/duck'), multiple: false end subject(:history) { BarHistory.new } describe "attributes=" do it "sets attributes" do history.attributes = { fubar: "baz", duck: "Quack" } expect(history.fubar).to eq "baz" expect(history.duck).to eq "Quack" end end describe "update_attributes" do it "sets attributes and save" do history.update_attributes(fubar: "baz", duck: "Quack") history.reload expect(history.fubar).to eq "baz" expect(history.duck).to eq "Quack" end end end end
Version data entries
41 entries across 41 versions & 1 rubygems