Sha256: 4c325dfc39cd54982636ffd634d24bc74f33ea7ad4cd0c2d1dbbe7077efad695
Contents?: true
Size: 1021 Bytes
Versions: 2
Compression:
Stored size: 1021 Bytes
Contents
require 'spec_helper' describe 'ordering methods' do describe '#available_steps' do before(:all){ @controller = Base::StepOneController.new } describe '#available_steps' do it 'should contain all steps' do get :show subject.available_steps.should eq [:step_one, :step_two, :step_three] end end describe '#step_is_available?' do it 'should return true if in list' do get :show subject.should be_step_is_available(:step_one) subject.should be_step_is_available(:step_two) subject.should be_step_is_available(:step_three) end it 'should return false if not available' do StairMaster::Step.any_instance.stubs(:available?).returns(false) get :show subject.should_not be_step_is_available(:step_one) end it 'should throw error if not apart of inital list' do get :show expect{ subject.step_is_available?(:step_four) }.to raise_error end end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
stair_master-0.0.3 | spec/controllers/base/ordering_spec.rb |
stair_master-0.0.2 | spec/controllers/base/ordering_spec.rb |