spec/samovar/command_spec.rb in samovar-2.0.1 vs spec/samovar/command_spec.rb in samovar-2.1.0
- old
+ new
@@ -44,9 +44,19 @@
'bottom' => Bottom
}
end
RSpec.describe Samovar::Command do
+ it "should invoke call" do
+ expect(Top).to receive(:new).and_wrap_original do |original_method, *args, &block|
+ original_method.call(*args, &block).tap do |instance|
+ expect(instance).to receive(:call)
+ end
+ end
+
+ Top.call([])
+ end
+
it "should use default value" do
top = Top[]
expect(top.options[:configuration]).to be == 'TEAPOT_CONFIGURATION'
end