Sha256: 228564858dddf94f3ce226cad970d9c072ece0508ddba4bbde46038d603b48f5
Contents?: true
Size: 476 Bytes
Versions: 6
Compression:
Stored size: 476 Bytes
Contents
require 'spec_helper' module Plutus describe EntriesController do routes { Plutus::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
6 entries across 6 versions & 2 rubygems