Sha256: 4c7925b3c983e89eb3953c5b669e651995137edc61258962355fd2691a7a4a39

Contents?: true

Size: 740 Bytes

Versions: 4

Compression:

Stored size: 740 Bytes

Contents

require "spec_helper"
require 'action_controller'
require "rails-footnotes/notes/assigns_note"

class FootnotesController < ActionController::Base
end

describe Footnotes::Notes::AssignsNote do
  let(:note) do
    @controller = FootnotesController.new
    Footnotes::Notes::AssignsNote.new(@controller)
  end
  subject {note}

  before(:each) {Footnotes::Notes::AssignsNote.ignored_assigns = []}
  it {should be_valid}
  its(:title) {should eql 'Assigns (3)'}
  specify {note.send(:assigns).should eql [:@action_has_layout, :@view_context_class, :@_status] }

  describe "Ignored Assigns" do
    before(:each) {Footnotes::Notes::AssignsNote.ignored_assigns = [:@_status]}
    it {note.send(:assigns).should_not include :@_status}
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
rails-footnotes-3.7.5.rc4 spec/notes/assigns_note_spec.rb
rails-footnotes-3.7.5.rc3 spec/notes/assigns_note_spec.rb
rails-footnotes-3.7.5.rc2 spec/notes/assigns_note_spec.rb
rails-footnotes-3.7.5.rc1 spec/notes/assigns_note_spec.rb