Created
March 18, 2015 15:56
-
-
Save fidothe/a4f35b4f0102169f097a to your computer and use it in GitHub Desktop.
Approaching App Controller load problem
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'spec_helper' | |
require_relative '../../../../apps/api/application' | |
RSpec.describe "Api::Controllers::Stuff::Create" do | |
let(:action) { Api::Controllers::Stuff::Create.new } | |
before(:all) do | |
Api::Application.preload! | |
end | |
context "successfully performing the action" do | |
it "causes stuff to happen" do | |
thing = double() | |
expect(Stuff).to receive(:new).with({a: 'b'}) { thing } | |
expect(StuffRepository).to receive(:happen).with(thing) | |
action.call(stuff: {a: 'b'}) | |
end | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment