Sha256: f57019a349a20ebffcf8c66b4e57b710319e2d68da4f69105ccabdaae64399a4

Contents?: true

Size: 481 Bytes

Versions: 2

Compression:

Stored size: 481 Bytes

Contents

require 'spec_helper'

module Phoenix
  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 %> => "Phoenix CMS"<% end %>)
      end

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

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
phoenix_core-0.2.1.beta lib/generators/phoenix/extension/templates/spec/models/phoenix/singular_name_spec.rb
phoenix_core-0.2.0.beta lib/generators/phoenix/extension/templates/spec/models/phoenix/singular_name_spec.rb