Created
March 18, 2015 16:05
-
-
Save fidothe/1dd0ea14a2091d067343 to your computer and use it in GitHub Desktop.
poss other approach to apps loading problem
This file contains hidden or 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 'api/application' | |
module Api | |
module Controllers | |
module Urls | |
class Add | |
include Api::Action | |
def call(params) | |
... | |
end | |
end | |
end | |
end | |
end |
This file contains hidden or 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 'api/controllers/stuff/create' | |
RSpec.describe Api::Controllers::Stuff::Create do | |
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) | |
subject.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