Sha256: 2599e730c47616be6999e6f0b7a61801e5843a30f7bc309c8b62617a6c6a2f90

Contents?: true

Size: 432 Bytes

Versions: 2

Compression:

Stored size: 432 Bytes

Contents

require "spec_helper"
require "virtus"

class DummyPost
  include Virtus.model

  attribute :title, String
  attribute :body, String
  attribute :comments, Array[String]
end

describe DummyPost do
  it { expect(described_class).to have_attribute(:title) }
  it { expect(described_class).to have_attribute(:body).of_type(String) }
  it { expect(described_class).to have_attribute(:comments).of_type(Array, member_type: String) }
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
rspec-virtus-1.0.2 spec/acceptance/rspec-virtus_spec.rb
rspec-virtus-1.0.1 spec/acceptance/rspec-virtus_spec.rb