Sha256: a07778f2bd76e4a6f7fa7178bbcb24adc751d71bf5d4a08a8def7c3a87528606

Contents?: true

Size: 1.24 KB

Versions: 18

Compression:

Stored size: 1.24 KB

Contents

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 %>, :attribute => 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

Version data entries

18 entries across 18 versions & 1 rubygems

Version Path
json_voorhees-0.5.3 lib/generators/json_voorhees/app_make_tests/templates/model.rb.erb
json_voorhees-0.5.2 lib/generators/json_voorhees/app_make_tests/templates/model.rb.erb
json_voorhees-0.5.1 lib/generators/json_voorhees/app_make_tests/templates/model.rb.erb
json_voorhees-0.5.0 lib/generators/json_voorhees/app_make_tests/templates/model.rb.erb
json_voorhees-0.4.9 lib/generators/json_voorhees/app_make_tests/templates/model.rb.erb
json_voorhees-0.4.8 lib/generators/json_voorhees/app_make_tests/templates/model.rb.erb
json_voorhees-0.4.7 lib/generators/json_voorhees/app_make_tests/templates/model.rb.erb
json_voorhees-0.4.6 lib/generators/json_voorhees/app_make_tests/templates/model.rb.erb
json_voorhees-0.4.5 lib/generators/json_voorhees/app_make_tests/templates/model.rb.erb
json_voorhees-0.4.4 lib/generators/json_voorhees/app_make_tests/templates/model.rb.erb
json_voorhees-0.4.3 lib/generators/json_voorhees/app_make_tests/templates/model.rb.erb
json_voorhees-0.4.2 lib/generators/json_voorhees/app_make_tests/templates/model.rb.erb
json_voorhees-0.4.1 lib/generators/json_voorhees/app_make_tests/templates/model.rb.erb
json_voorhees-0.4.0 lib/generators/json_voorhees/app_make_tests/templates/model.rb.erb
json_voorhees-0.3.9 lib/generators/json_voorhees/app_make_tests/templates/model.rb.erb
json_voorhees-0.3.6 lib/generators/json_voorhees/app_make_tests/templates/model.rb.erb
json_voorhees-0.3.5 lib/generators/json_voorhees/app_make_tests/templates/model.rb.erb
json_voorhees-0.3.0 lib/generators/json_voorhees/app_make_tests/templates/model.rb.erb