Sha256: c303f1e15d7aae95af1a19e637e01ecd67f7024d95587aea7707bd27fcd64dfb

Contents?: true

Size: 561 Bytes

Versions: 37

Compression:

Stored size: 561 Bytes

Contents

require 'spec_helper'
require 'volt/page/sub_context'

describe Volt::SubContext do
  it 'should respond_to correctly on locals' do
    sub_context = Volt::SubContext.new(name: 'Name')

    expect(sub_context.respond_to?(:name)).to eq(true)
    expect(sub_context.respond_to?(:missing)).to eq(false)
  end

  it 'should return correctly for missing methods on SubContext' do
    sub_context = Volt::SubContext.new(name: 'Name')

    expect(sub_context.send(:name)).to eq('Name')
    expect { sub_context.send(:missing) }.to raise_error(NoMethodError)
  end
end

Version data entries

37 entries across 37 versions & 1 rubygems

Version Path
volt-0.9.7.pre8 spec/page/sub_context_spec.rb
volt-0.9.7.pre7 spec/page/sub_context_spec.rb
volt-0.9.7.pre6 spec/page/sub_context_spec.rb
volt-0.9.7.pre5 spec/page/sub_context_spec.rb
volt-0.9.7.pre3 spec/page/sub_context_spec.rb
volt-0.9.7.pre2 spec/page/sub_context_spec.rb
volt-0.9.6 spec/page/sub_context_spec.rb
volt-0.9.6.pre3 spec/page/sub_context_spec.rb
volt-0.9.6.pre2 spec/page/sub_context_spec.rb
volt-0.9.6.pre1 spec/page/sub_context_spec.rb
volt-0.9.5 spec/page/sub_context_spec.rb
volt-0.9.5.pre12 spec/page/sub_context_spec.rb
volt-0.9.5.pre11 spec/page/sub_context_spec.rb
volt-0.9.5.pre9 spec/page/sub_context_spec.rb
volt-0.9.5.pre8 spec/page/sub_context_spec.rb
volt-0.9.5.pre7 spec/page/sub_context_spec.rb
volt-0.9.5.pre6 spec/page/sub_context_spec.rb
volt-0.9.5.pre5 spec/page/sub_context_spec.rb
volt-0.9.5.pre4 spec/page/sub_context_spec.rb
volt-0.9.5.pre3 spec/page/sub_context_spec.rb