spec/controllers/entries_controller_spec.rb in plutus-0.12.2 vs spec/controllers/entries_controller_spec.rb in plutus-0.13
- old
+ new
@@ -8,12 +8,12 @@
@mock_entry ||= FactoryGirl.create(:entry_with_credit_and_debit)
end
describe "GET index" do
it "assigns all entries as @entries" do
- Entry.stub_chain(:limit, :order).and_return([mock_entry])
+ allow(Entry).to receive_message_chain(:per, :order).and_return([mock_entry])
get :index
- assigns[:entries].should == [mock_entry]
+ expect(assigns[:entries]).to eq([mock_entry])
end
end
end
end