require "rails_helper" <% attributes.each do |pair| %> RSpec.describe ::<%= module_camel %>::V<%= api_version %>::<%= resource_camel %>, '.<%= pair.split(":")[0] %>', :type => :model do describe "Attributes" do it "does not save when attribute is nil" do #<%= resource_singular %> = FactoryGirl.build(:<%= module_snake %>_<%= resource_singular %>_<%= api_version %>, :<%= pair.split(":")[0] %> => nil) #expect(<%= resource_singular %>.save).to equal(false) end it "does not save when <%= pair %> is ..." do #expect(<%= resource_singular %>.save).to equal(false) end end end <% end %> RSpec.describe ::<%= module_camel %>::V<%= api_version %>::<%= resource_camel %>, :type => :model do describe "Dependencies" do before(:example) do @<%= resource_singular %> = FactoryGirl.create(:<%= module_snake %>_<%= resource_singular %>_<%= api_version %>) end it "deletes ... when deleted" do end end end RSpec.describe ::<%= module_camel %>::V<%= api_version %>::<%= resource_camel %>, :type => :model do describe "Callbacks" do before(:example) do @<%= resource_singular %> = FactoryGirl.create(:<%= module_snake %>_<%= resource_singular %>_<%= api_version %>) end it "creates a ..." do #expect(object.posts.nil?).to equal(false) end end end