test/lib/vedeu/cursors/dsl_test.rb in vedeu-0.8.9 vs test/lib/vedeu/cursors/dsl_test.rb in vedeu-0.8.10

- old
+ new

@@ -22,31 +22,32 @@ end # DSLTestClass describe DSL do - let(:described) { Vedeu::Cursors::DSL } - let(:instance) { Vedeu::Cursors::DSLTestClass.new } + let(:described) { Vedeu::Cursors::DSL } + let(:included_described) { Vedeu::Cursors::DSLTestClass } + let(:included_instance) { included_described.new } describe '#cursor' do - it { instance.must_respond_to(:cursor) } + it { included_instance.must_respond_to(:cursor) } end describe '#cursor!' do - it { instance.must_respond_to(:cursor!) } + it { included_instance.must_respond_to(:cursor!) } end describe '#show_cursor!' do - it { instance.must_respond_to(:show_cursor!) } + it { included_instance.must_respond_to(:show_cursor!) } end describe '#no_cursor!' do - it { instance.must_respond_to(:no_cursor!) } + it { included_instance.must_respond_to(:no_cursor!) } end describe '#hide_cursor!' do - it { instance.must_respond_to(:hide_cursor!) } + it { included_instance.must_respond_to(:hide_cursor!) } end # describe '#cursor' do # let(:_value) {} # let(:cursor) { Vedeu::Cursors::Cursor.new(name: :actinium) } @@ -54,11 +55,11 @@ # before do # Vedeu.cursors.reset! # Vedeu.cursors.stubs(:by_name).returns(cursor) # end - # subject { instance.cursor(_value) } + # subject { included_instance.cursor(_value) } # it do # subject # Vedeu.cursors.by_name(:actinium).visible?.must_equal(false) # end @@ -108,19 +109,19 @@ # end # end # end describe '#cursor!' do - subject { instance.cursor! } + subject { included_instance.cursor! } it do subject Vedeu.cursors.by_name(:actinium).visible?.must_equal(true) end end describe '#no_cursor!' do - subject { instance.no_cursor! } + subject { included_instance.no_cursor! } it do subject Vedeu.cursors.by_name(:actinium).visible?.must_equal(false) end