Sha256: 617466baf7b3d944b01fe795acda8982e8842970de09abc58e59b02840791cde

Contents?: true

Size: 529 Bytes

Versions: 2

Compression:

Stored size: 529 Bytes

Contents

require 'spec_helper'

module Answers
  module <%= namespacing %>
    describe <%= class_name %> do
      describe "validations" do
        subject do
          FactoryGirl.create(:<%= singular_name %><% if (title = attributes.detect { |a| a.type.to_s == "string" }).present? -%>,
          :<%= title.name %> => "Answers"<% end %>)
        end

        it { should be_valid }
        its(:errors) { should be_empty }
<% if title -%>
        its(:<%= title.name %>) { should == "Answers" }
<% end -%>
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
answers-core-0.0.0.2 lib/generators/answers/engine/templates/spec/models/answers/namespace/singular_name_spec.rb.erb
answers-core-0.0.0 lib/generators/answers/engine/templates/spec/models/answers/namespace/singular_name_spec.rb.erb