Factories now under test
authorNeil Smith <neil.git@njae.me.uk>
Tue, 7 Jan 2014 23:46:47 +0000 (23:46 +0000)
committerNeil Smith <neil.git@njae.me.uk>
Tue, 7 Jan 2014 23:46:47 +0000 (23:46 +0000)
spec/factories_spec.rb [new file with mode: 0644]

diff --git a/spec/factories_spec.rb b/spec/factories_spec.rb
new file mode 100644 (file)
index 0000000..20ef9b2
--- /dev/null
@@ -0,0 +1,9 @@
+require 'spec_helper'
+
+FactoryGirl.factories.map(&:name).each do |factory_name|
+  describe "The #{factory_name} factory" do
+    it 'is valid' do
+      expect(FactoryGirl.build(factory_name)).to be_valid
+    end
+  end
+end