Sha256: 59f81083a943049810da48a9edd61aa1e890c3c915ed2068ffeae20ccf6c2bdc

Contents?: true

Size: 468 Bytes

Versions: 7

Compression:

Stored size: 468 Bytes

Contents

require 'spec_helper'

# Let's create a new class for our experiments
class Dummy2 < Amfetamine::Base
end

describe "Dynamic Attributes" do
  let(:dummy) {build(:dummy2)}

  it "should set attributes dynamically" do
    Dummy2.prevent_external_connections! do |r|
      r.get {dummy}
      dummy.should respond_to(:title=)
      dummy.should respond_to(:title)
      dummy.should respond_to(:description=)
      dummy.should respond_to(:description)
    end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
amfetamine-0.4.2 spec/amfetamine/dynamic_attributes_spec.rb
amfetamine-0.4.1 spec/amfetamine/dynamic_attributes_spec.rb
amfetamine-0.4.0 spec/amfetamine/dynamic_attributes_spec.rb
amfetamine-0.3.3 spec/amfetamine/dynamic_attributes_spec.rb
amfetamine-0.3.2 spec/amfetamine/dynamic_attributes_spec.rb
amfetamine-0.3.1 spec/amfetamine/dynamic_attributes_spec.rb
amfetamine-0.3.0 spec/amfetamine/dynamic_attributes_spec.rb