spec/expectation_spec.rb in caricature-0.3.1 vs spec/expectation_spec.rb in caricature-0.5.0
- old
+ new
@@ -1,18 +1,22 @@
require File.dirname(__FILE__) + "/bacon_helper"
+describe "Caricature::Expectations" do
+
+end
+
describe "Caricature::ExpectationBuilder" do
it "should create an expectation builder" do
- builder = Caricature::ExpectationBuilder.new :some_method, nil
+ builder = Caricature::ExpectationBuilder.new :some_method
builder.should.not.equal nil
end
describe "when using all defaults" do
before do
- builder = Caricature::ExpectationBuilder.new :some_method, nil
+ builder = Caricature::ExpectationBuilder.new :some_method
@expectation = builder.build
end
it "should have the correct method_name" do
@expectation.method_name.should.equal :some_method
@@ -37,11 +41,11 @@
end
describe "when specifying only arguments" do
before do
- builder = Caricature::ExpectationBuilder.new :some_method,nil
+ builder = Caricature::ExpectationBuilder.new :some_method
builder.with(1, 2, 3)
@expectation = builder.build
end
it "should have the correct method_name" do
@@ -67,11 +71,11 @@
end
describe "when specifying only a block for the return value" do
before do
- builder = Caricature::ExpectationBuilder.new :some_method, nil
+ builder = Caricature::ExpectationBuilder.new :some_method
builder.return { 5 }
@expectation = builder.build
end
it "should have the correct method_name" do
@@ -97,11 +101,11 @@
end
describe "when specifying a return value" do
before do
- builder = Caricature::ExpectationBuilder.new :some_method, nil
+ builder = Caricature::ExpectationBuilder.new :some_method
builder.return 5
@expectation = builder.build
end
it "should have the correct method_name" do
@@ -128,11 +132,11 @@
describe "when specifying a raise arguments" do
before do
@msg = "Hold on, that wasn't supposed to happen"
- builder = Caricature::ExpectationBuilder.new :some_method, nil
+ builder = Caricature::ExpectationBuilder.new :some_method
builder.raise @msg
@expectation = builder.build
end
it "should have the correct method_name" do
@@ -158,10 +162,10 @@
end
describe "when specifying a return value and telling you want a call to super before" do
before do
- builder = Caricature::ExpectationBuilder.new :some_method, nil
+ builder = Caricature::ExpectationBuilder.new :some_method
builder.return(5).super_before
@expectation = builder.build
end
it "should have the correct method_name" do
\ No newline at end of file