Sha256: ca118e7e715121406e7db7de2cf8d06f9c1dbd53924f7412abb2e9c35ce5d143
Contents?: true
Size: 559 Bytes
Versions: 7
Compression:
Stored size: 559 Bytes
Contents
shared_examples "valid role model" do it "generate role model" do run_generator role_class = file("app/models/role.rb") expect(role_class).to exist expect(role_class).to have_correct_syntax expect(role_class).to contain("validates_presence_of :name") expect(role_class).to contain("has_many :authorizations") expect(role_class).to contain("has_many :features, through: :authorizations") expect(role_class).to contain("accepts_nested_attributes_for :authorizations, reject_if: :all_blank, allow_destroy: :true") end end
Version data entries
7 entries across 7 versions & 1 rubygems