spec/rspec/rails/mocks/mock_model_spec.rb in rspec-rails-2.3.0 vs spec/rspec/rails/mocks/mock_model_spec.rb in rspec-rails-2.3.1
- old
+ new
@@ -142,9 +142,16 @@
context "with an ActiveRecord model" do
before(:each) do
MockableModel.stub(:column_names).and_return(["column_a", "column_b"])
@model = mock_model(MockableModel)
end
+
+ it "accepts two arguments" do
+ expect do
+ @model.respond_to?("title_before_type_cast", false)
+ end.to_not raise_exception
+ end
+
context "without as_null_object" do
it "says it will respond_to?(key) if RealModel has the attribute 'key'" do
@model.respond_to?("column_a").should be(true)
end
it "says it will not respond_to?(key) if RealModel does not have the attribute 'key'" do