Sha256: aa7152b8d8df9f1d352e83b406544345d815c0ea77e11772ccc0c0b7d945f5c7

Contents?: true

Size: 1.4 KB

Versions: 2

Compression:

Stored size: 1.4 KB

Contents

module MegaBar
  require 'spec_helper'
  require_relative 'common'

  RSpec.describe MegaBar::TextareasController, :type => :controller do
    include_context "common" #pretty important!
    let(:a_record) {
      create(:textarea) unless model_class.first
      model_class.first
    }
    let(:controller_class) { MegaBar::TextareasController }
    let(:updated_attrs) {  { 'field_display_id' =>  2 } }
    let(:valid_attributes) { { 'field_display_id' => '2' } }
    let(:valid_new) { { field_display_id: '5' } }
    let(:fields_and_displays) {
      create(:field_with_displays, field: 'field_display_id', tablename: 'mega_bar_textareas', model_display_ids: model_model_display_ids )
    }
    # Megabar says, If you want to test invalid data, modify these: 
    let(:model_class) { MegaBar::Textarea }
    let(:skip_invalids) { false }
    let(:invalid_new) { { name: 'TextArea TextArea', make_block: ''} }
    let(:invalid_attributes) { { 'field_display_id' => '' }  }

    # the rest of these you shouldn't have to mess with.
    let(:controlller) { 'mega_bar/textareas' }
    let(:model_and_page) { create(:model_with_page, classname: 'Textarea', tablename: 'mega_bar_textareas', name: 'Textarea', modyule: 'MegaBar' ) }
    let(:page_terms) { ["MegaBar", "textareas"]  }
    let(:page_name) { 'MegaBar page'   }
    let(:spec_subject) { 'textarea' }
    let(:uri) { 'textareas' }
    let(:valid_session) { {} }

  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
mega_bar-0.5.2 spec/controllers/textareas_controller_spec.rb
mega_bar-0.5.1 spec/controllers/textareas_controller_spec.rb