File tree Expand file tree Collapse file tree 2 files changed +4
-0
lines changed
lib/rspec/active_model/mocks
spec/rspec/active_model/mocks Expand file tree Collapse file tree 2 files changed +4
-0
lines changed Original file line number Diff line number Diff line change @@ -147,6 +147,7 @@ def self.param_delimiter; "-"; end
147147 [ :save , :update_attributes , :update ] . each do |key |
148148 if stubs [ key ] == false
149149 RSpec ::Mocks . allow_message ( m . errors , :empty? ) . and_return ( false )
150+ RSpec ::Mocks . allow_message ( m . errors , :blank? ) . and_return ( false )
150151 end
151152 end
152153 end
Original file line number Diff line number Diff line change 8181 it "is empty" do
8282 model = mock_model ( MockableModel )
8383 expect ( model . errors ) . to be_empty
84+ expect ( model . errors ) . to be_blank
8485 end
8586 end
8687
8788 context "with :save => false" do
8889 it "is not empty" do
8990 model = mock_model ( MockableModel , :save => false )
9091 expect ( model . errors ) . not_to be_empty
92+ expect ( model . errors ) . not_to be_blank
9193 end
9294 end
9395
9496 context "with :update_attributes => false" do
9597 it "is not empty" do
9698 model = mock_model ( MockableModel , :save => false )
9799 expect ( model . errors ) . not_to be_empty
100+ expect ( model . errors ) . not_to be_blank
98101 end
99102 end
100103 end
You can’t perform that action at this time.
0 commit comments