Sha256: 9970bf6aabab7d7c22c6d4daff3add337889a37bf2eb60691f7c08edb4931c13
Contents?: true
Size: 1.3 KB
Versions: 4
Compression:
Stored size: 1.3 KB
Contents
require 'test_helper' module Vedeu describe ApplicationView do let(:described) { Vedeu::ApplicationView } let(:instance) { described.new(params) } let(:params) { {} } describe '#initialize' do it { instance.must_be_instance_of(described) } it { instance.instance_variable_get('@params').must_equal(params) } context 'defined methods' do let(:params) { { elements: [:hydrogen, :helium] } } it { instance.must_respond_to(:elements) } it { instance.elements.must_equal(params[:elements]) } context 'but the params contain a key already defined as a method' do let(:params) { { render: [:some_value] } } it { instance.must_respond_to(:render) } it { proc { instance.render }.wont_equal(params[:render]) } end end end # describe 'accessors' do # it { instance.must_respond_to(:params) } # it { instance.must_respond_to(:params=) } # end describe '.render' do subject { described.render(params) } it { proc { subject }.must_raise(Vedeu::NotImplemented) } end describe '#render' do it { instance.must_respond_to(:render) } end end # ApplicationView end # Vedeu
Version data entries
4 entries across 4 versions & 1 rubygems