Sha256: ee21c4293e372add1b362e318434af583cca5268fdeff76907a352a40d01912b
Contents?: true
Size: 478 Bytes
Versions: 3
Compression:
Stored size: 478 Bytes
Contents
require 'spec_helper' module Borutus describe EntriesController do routes { Borutus::Engine.routes } def mock_entry(stubs={}) @mock_entry ||= FactoryGirl.create(:entry_with_credit_and_debit) end describe "GET index" do it "assigns all entries as @entries" do allow(Entry).to receive_message_chain(:per, :order).and_return([mock_entry]) get :index expect(assigns[:entries]).to eq([mock_entry]) end end end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
borutus-0.2.1 | spec/controllers/entries_controller_spec.rb |
borutus-0.2.0 | spec/controllers/entries_controller_spec.rb |
borutus-0.1.0 | spec/controllers/entries_controller_spec.rb |