Sha256: 4116617eee9c50086e23f6939b1ea54cecc5a738702406934e9f7ffeaa1e1b7c
Contents?: true
Size: 943 Bytes
Versions: 3
Compression:
Stored size: 943 Bytes
Contents
# encoding: utf-8 require "spec_helper" module Refinery module <%= namespacing %> describe "<%= plural_name %>", type: :feature do before(:each) do Refinery::<%= namespacing %>::Engine::load_seed end describe "Create <%= singular_name %>" do before do visit refinery.new_<%= plural_name %>_<%= singular_name %>_path end it "should create a new item" do <% attributes.each do |a| -%><% if a.type == :string -%> fill_in "<%= singular_name %>_<%= a.name %>", :with => "Test" <% elsif a.type == :text -%> fill_in "<%= singular_name %>_<%= a.name %>", :with => "Test" <% end -%><% end -%> click_button ::I18n.t('.refinery.<%= plural_name %>.<%= plural_name %>.new.send') expect(page).to have_content("Thank You") expect(Refinery::<%= namespacing %>::<%= class_name %>.count).to eq(1) end end end end end
Version data entries
3 entries across 3 versions & 1 rubygems