Skip to content

Instantly share code, notes, and snippets.

@fidothe
Created March 18, 2015 16:05
Show Gist options
  • Save fidothe/1dd0ea14a2091d067343 to your computer and use it in GitHub Desktop.
Save fidothe/1dd0ea14a2091d067343 to your computer and use it in GitHub Desktop.
poss other approach to apps loading problem
require 'api/application'
module Api
module Controllers
module Urls
class Add
include Api::Action
def call(params)
...
end
end
end
end
end
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