Sha256: e49c9e5001b87becd7ab0040103c20735190314fadc9c454e05a2a363fb1ac8b

Contents?: true

Size: 473 Bytes

Versions: 2

Compression:

Stored size: 473 Bytes

Contents

require File.expand_path(File.dirname(__FILE__) + '<%= '/..' * class_nesting_depth %>/../spec_helper')

describe <%= class_name %> do
  before do
<% if factory? -%>
    @<%= singular_name %> = Factory.build(<%= full_name.to_sym.inspect %>)
<% elsif exemplar? -%>
    @<%= singular_name %> = <%= class_name %>.spawn
<% else -%>
    @<%= singular_name %> = <%= class_name %>.new
<% end -%>
  end

  it "should be valid" do
    @<%= singular_name %>.should be_valid
  end
end

Version data entries

2 entries across 2 versions & 2 rubygems

Version Path
hashrocket-hashrocket-terraformation-0.0.0 rails_generators/terramodel/templates/model_spec.rb.erb
hashrocket-terraformation-0.0.0 rails_generators/terramodel/templates/model_spec.rb.erb