test/lib/vedeu/dsl/interface_test.rb in vedeu-0.4.16 vs test/lib/vedeu/dsl/interface_test.rb in vedeu-0.4.17
- old
+ new
@@ -67,59 +67,59 @@
it { subject.must_be_instance_of(Vedeu::Border) }
end
describe '#cursor' do
- let(:value) {}
+ let(:_value) {}
before { Vedeu.cursors.reset }
- subject { instance.cursor(value) }
+ subject { instance.cursor(_value) }
it {
subject
Vedeu.cursors.find('actinium').visible?.must_equal(false)
}
context 'when the value is false' do
- let(:value) { false }
+ let(:_value) { false }
it {
subject
Vedeu.cursors.find('actinium').visible?.must_equal(false)
}
end
context 'when the value is nil' do
- let(:value) {}
+ let(:_value) {}
it {
subject
Vedeu.cursors.find('actinium').visible?.must_equal(false)
}
end
context 'when the value is :show' do
- let(:value) { :show }
+ let(:_value) { :show }
it {
subject
Vedeu.cursors.find('actinium').visible?.must_equal(true)
}
end
context 'when the value is true' do
- let(:value) { true }
+ let(:_value) { true }
it {
subject
Vedeu.cursors.find('actinium').visible?.must_equal(true)
}
end
context 'when the value is :yes' do
- let(:value) { :yes }
+ let(:_value) { :yes }
it {
subject
Vedeu.cursors.find('actinium').visible?.must_equal(true)
}
@@ -134,17 +134,13 @@
Vedeu.cursors.find('actinium').visible?.must_equal(true)
}
end
describe '#delay' do
- it 'sets the delay attribute' do
- Vedeu.interface 'cobalt' do
- delay 0.25
- end
+ subject { instance.delay(0.25) }
- Vedeu.use('cobalt').delay.must_equal(0.25)
- end
+ it { subject; model.delay.must_equal(0.25) }
end
describe '#focus!' do
context 'when a single call is made' do
before do
@@ -203,20 +199,20 @@
end
end
end
describe '#group' do
- let(:value) { 'elements' }
+ let(:_value) { 'elements' }
before { Vedeu.groups.reset }
- subject { instance.group(value) }
+ subject { instance.group(_value) }
it { subject.must_be_instance_of(Vedeu::Group) }
context 'when the value is empty or nil' do
- let(:value) { '' }
+ let(:_value) { '' }
it { subject.must_equal(false) }
end
context 'when the named group exists' do
@@ -265,16 +261,12 @@
it { proc { subject }.must_raise(InvalidSyntax) }
end
end
describe '#name' do
- it 'sets the name attribute' do
- Vedeu.interface do
- name 'nickel'
- end
+ subject { instance.name('nickel') }
- Vedeu.use('nickel').name.must_equal('nickel')
- end
+ it { subject; model.name.must_equal('nickel') }
end
describe '#show!' do
subject {
Vedeu.interface 'xenon' do