README.md in rspec-virtus-0.0.1 vs README.md in rspec-virtus-0.1.0
- old
+ new
@@ -1,6 +1,6 @@
-# Rspec::Virtus
+# Rspec::Virtus [![Build Status](https://travis-ci.org/mikespokefire/rspec-virtus.png?branch=master)](https://travis-ci.org/mikespokefire/rspec-virtus)
Simple RSpec matchers for your Virtus objects
## Installation
@@ -22,10 +22,11 @@
class Post
include Virtus
attribute :title, String
attribtue :body, String
+ attribtue :comments, Array[String]
end
And with `rspec-virtus` we can now make simple assertions about these models
require 'spec_helper'
@@ -36,9 +37,13 @@
expect(described_class).to have_attribute(:title)
end
it "has an attribute with a type check" do
expect(described_class).to have_attribute(:body).of_type(String)
+ end
+
+ it "has an array attribute with a type check" do
+ expect(described_class).to have_attribute(:comments).of_type(Array, member_type: String)
end
end
end
## Contributing