require "rails_helper" <% attributes.each do |pair| %> RSpec.describe <%= HorsePower.get_camel(resource_name) %>, '.<%= HorsePower.get_column(pair) %>', :type => :model do describe "Attributes" do it "does not save when attribute is nil" do #<%= HorsePower.get_singular(resource_name) %> = FactoryGirl.build(:<%= HorsePower.get_singular(resource_name) %>_<%= api_version %>, :<%= HorsePower.get_column(pair) %> => nil) #expect(<%= HorsePower.get_singular(resource_name) %>.save).to equal(false) end it "does not save when <%= pair %> is ..." do #expect(<%= HorsePower.get_singular(resource_name) %>.save).to equal(false) end end end <% end %> RSpec.describe <%= HorsePower.get_camel(resource_name) %>, :type => :model do describe "Dependencies" do before(:example) do @<%= HorsePower.get_singular(resource_name) %> = FactoryGirl.create(:<%= HorsePower.get_singular(resource_name) %>_<%= api_version %>) end it "deletes ... when deleted" do end end end RSpec.describe <%= HorsePower.get_camel(resource_name) %>, :type => :model do describe "Callbacks" do before(:example) do @<%= HorsePower.get_singular(resource_name) %> = FactoryGirl.create(:<%= HorsePower.get_singular(resource_name) %>_<%= api_version %>) end it "creates a ..." do #expect(object.posts.nil?).to equal(false) end end end