spec/lib/console_spec.rb in simple_console-0.0.2 vs spec/lib/console_spec.rb in simple_console-0.0.3
- old
+ new
@@ -46,13 +46,13 @@
end
end
describe '.define_cmd' do
- it 'should create instance method' do
+ it 'should save block' do
expect {
cls.define_cmd(:add, "desc") { |a, b| puts a + b }
- }.to change { cls.instance_methods.include?(:_cmd_add) }.to(true)
+ }.to change { cls.commands.length }.by(1)
end
end
describe '.run_cmd' do