test/lib/vedeu/borders/dsl_test.rb in vedeu-0.7.4 vs test/lib/vedeu/borders/dsl_test.rb in vedeu-0.8.0
- old
+ new
@@ -41,20 +41,24 @@
let(:options) { {} }
subject { instance.bottom_left(char, options) }
it { subject.must_be_instance_of(Vedeu::Cells::BottomLeft) }
+ end
+ describe '#bottom_left=' do
it { instance.must_respond_to(:bottom_left=) }
end
describe '#bottom_right' do
let(:char) { 'D' }
let(:options) { {} }
subject { instance.bottom_right(char, options) }
it { subject.must_be_instance_of(Vedeu::Cells::BottomRight) }
+ end
+ describe '#bottom_right=' do
it { instance.must_respond_to(:bottom_right=) }
end
describe '#disable!' do
subject { instance.disable! }
@@ -73,46 +77,59 @@
let(:options) { {} }
subject { instance.top_horizontal(char, options) }
it { subject.must_be_instance_of(Vedeu::Cells::TopHorizontal) }
+ end
+
+ describe '#top_horizontal=' do
it { instance.must_respond_to(:top_horizontal=) }
end
describe '#bottom_horizontal' do
let(:char) { 'B' }
let(:options) { {} }
subject { instance.bottom_horizontal(char, options) }
it { subject.must_be_instance_of(Vedeu::Cells::BottomHorizontal) }
+ end
+
+ describe '#bottom_horizontal=' do
it { instance.must_respond_to(:bottom_horizontal=) }
end
describe '#horizontal' do
let(:char) { 'H' }
let(:options) { {} }
subject { instance.horizontal(char, options) }
it { subject.must_be_instance_of(Vedeu::Cells::Horizontal) }
+ end
+
+ describe '#horizontal=' do
it { instance.must_respond_to(:horizontal=) }
end
describe '#show_bottom' do
subject { instance.show_bottom(boolean) }
- it { instance.must_respond_to(:bottom) }
it { subject.must_be_instance_of(TrueClass) }
context 'when false' do
let(:boolean) { false }
it { subject.must_be_instance_of(FalseClass) }
end
+ end
+ describe '#bottom' do
it { instance.must_respond_to(:bottom) }
+ end
+
+ describe '#bottom=' do
it { instance.must_respond_to(:bottom=) }
end
describe '#hide_bottom!' do
subject { instance.hide_bottom! }
@@ -129,20 +146,25 @@
describe '#show_left' do
subject { instance.show_left(boolean) }
it { subject.must_be_instance_of(TrueClass) }
- it { instance.must_respond_to(:left) }
- it { instance.must_respond_to(:left=) }
-
context 'when false' do
let(:boolean) { false }
it { subject.must_be_instance_of(FalseClass) }
end
end
+ describe '#left' do
+ it { instance.must_respond_to(:left) }
+ end
+
+ describe '#left=' do
+ it { instance.must_respond_to(:left=) }
+ end
+
describe '#hide_left!' do
subject { instance.hide_left! }
it { subject.must_be_instance_of(FalseClass) }
end
@@ -156,20 +178,25 @@
describe '#show_right' do
subject { instance.show_right(boolean) }
it { subject.must_be_instance_of(TrueClass) }
- it { instance.must_respond_to(:right) }
- it { instance.must_respond_to(:right=) }
-
context 'when false' do
let(:boolean) { false }
it { subject.must_be_instance_of(FalseClass) }
end
end
+ describe '#right' do
+ it { instance.must_respond_to(:right) }
+ end
+
+ describe '#right=' do
+ it { instance.must_respond_to(:right=) }
+ end
+
describe '#hide_right!' do
subject { instance.hide_right! }
it { subject.must_be_instance_of(FalseClass) }
end
@@ -183,20 +210,25 @@
describe '#show_top' do
subject { instance.show_top(boolean) }
it { subject.must_be_instance_of(TrueClass) }
- it { instance.must_respond_to(:top) }
- it { instance.must_respond_to(:top=) }
-
context 'when false' do
let(:boolean) { false }
it { subject.must_be_instance_of(FalseClass) }
end
end
+ describe '#top' do
+ it { instance.must_respond_to(:top) }
+ end
+
+ describe '#top=' do
+ it { instance.must_respond_to(:top=) }
+ end
+
describe '#hide_top!' do
subject { instance.hide_top! }
it { subject.must_be_instance_of(FalseClass) }
end
@@ -212,40 +244,52 @@
subject { instance.title(_value) }
it { subject.must_be_instance_of(String) }
it { subject.must_equal('Some title') }
+ end
+
+ describe '#title=' do
it { instance.must_respond_to(:title=) }
end
describe '#caption' do
let(:_value) { 'Some caption'}
subject { instance.caption(_value) }
it { subject.must_be_instance_of(String) }
it { subject.must_equal('Some caption') }
+ end
+
+ describe '#caption=' do
it { instance.must_respond_to(:caption=) }
end
describe '#top_left' do
let(:char) { 'A' }
let(:options) { {} }
subject { instance.top_left(char, options) }
it { subject.must_be_instance_of(Vedeu::Cells::TopLeft) }
+ end
+
+ describe '#top_left=' do
it { instance.must_respond_to(:top_left=) }
end
describe '#top_right' do
let(:char) { 'B' }
let(:options) { {} }
subject { instance.top_right(char, options) }
it { subject.must_be_instance_of(Vedeu::Cells::TopRight) }
+ end
+
+ describe '#top_right=' do
it { instance.must_respond_to(:top_right=) }
end
describe '#use' do
before do
@@ -271,29 +315,38 @@
let(:options) { {} }
subject { instance.left_vertical(char, options) }
it { subject.must_be_instance_of(Vedeu::Cells::LeftVertical) }
+ end
+
+ describe '#left_vertical=' do
it { instance.must_respond_to(:left_vertical=) }
end
describe '#right_vertical' do
let(:char) { 'V' }
let(:options) { {} }
subject { instance.right_vertical(char, options) }
it { subject.must_be_instance_of(Vedeu::Cells::RightVertical) }
+ end
+
+ describe '#right_vertical=' do
it { instance.must_respond_to(:right_vertical=) }
end
describe '#vertical' do
let(:char) { 'V' }
let(:options) { {} }
subject { instance.vertical(char, options) }
it { subject.must_be_instance_of(Vedeu::Cells::Vertical) }
+ end
+
+ describe '#vertical=' do
it { instance.must_respond_to(:vertical=) }
end
end # DSL