Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Rails Engines & RSpec
Search
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
Amanda
January 21, 2016
Technology
240
0
Share
Rails Engines & RSpec
Amanda
January 21, 2016
More Decks by Amanda
See All by Amanda
Lessons Learned From an Elixir OTP Project
amandasposito
2
96
Aprendizados de um projeto Elixir OTP
amandasposito
4
630
SOLID - Dependency inversion principle
amandasposito
0
89
Como concorrência funciona em Elixir?
amandasposito
1
230
Programação Funcional & Elixir
amandasposito
3
130
Ecto, você sabe o que é ?
amandasposito
4
240
Novidades no Rails 5
amandasposito
0
100
Elixir e Phoenix
amandasposito
3
580
Elixir em 5 minutos
amandasposito
1
99
Other Decks in Technology
See All in Technology
AI時代における技術的負債への取り組み
codenote
1
1.5k
マルチエージェント × ハーネスエンジニアリング × GitLab Duo Agent Platformで実現する「AIエージェントに仕事をさせる時代へ。」 / 20260421 GitLab Duo Agent Platform
n11sh1
0
160
扱える不確実性を増やしていく - スタートアップEMが考える「任せ方」
kadoppe
0
300
Rebirth of Software Craftsmanship in the AI Era
lemiorhan
PRO
4
2k
昔はシンプルだった_AmazonS3
kawaji_scratch
0
330
実践ハーネスエンジニアリング:TAKTで実現するAIエージェント制御 / Practical Harness Engineering: AI Agent Control Enabled by TAKT
nrslib
11
4.6k
2026年、知っておくべき最新 サーバレスTips10選/serverless-10-tips
slsops
13
5.2k
Standards et agents IA : un tour d’horizon de MCP, A2A, ADK et plus encore
glaforge
0
170
コードや知識を組み込む / Incorporate Code and Knowledge
ks91
PRO
0
150
Practical TypeProf: Lessons from Analyzing Optcarrot
mame
0
340
AI時代のガードレールとしてのAPIガバナンス
nagix
0
280
Claude Code を安全に使おう勉強会 / Claude Code Security Basics
masahirokawahara
11
33k
Featured
See All Featured
VelocityConf: Rendering Performance Case Studies
addyosmani
333
25k
Optimising Largest Contentful Paint
csswizardry
37
3.6k
Fireside Chat
paigeccino
42
3.9k
How Software Deployment tools have changed in the past 20 years
geshan
0
33k
The Psychology of Web Performance [Beyond Tellerrand 2023]
tammyeverts
49
3.4k
Rails Girls Zürich Keynote
gr2m
96
14k
Chasing Engaging Ingredients in Design
codingconduct
0
170
For a Future-Friendly Web
brad_frost
183
10k
Money Talks: Using Revenue to Get Sh*t Done
nikkihalliwell
0
200
The Illustrated Children's Guide to Kubernetes
chrisshort
51
52k
Balancing Empowerment & Direction
lara
6
1.1k
Context Engineering - Making Every Token Count
addyosmani
9
830
Transcript
Rails Engines e RSpec
“Engines can be considered miniature applications that provide functionality to
their host applications. “ http://guides.rubyonrails.org/engines.html
Ruby Gem + MVC “A Rails application is actually just
a ‘supercharged’ engine”
None
É uma maneira de organizar e compartilhar código reutilizável através
de uma ou mais aplicações.
Core Modulo Financeiro Modulo Logística
Redundância Melhor manutenção
Trade-offs
Criando uma Rails Engine do Zero
Nome da nossa engine Sem os arquivos do Test::Unit Plugin
isolado por namespace Cria com uma estrutura padrão com a dummy application especificada
Dummy Application Quando geramos a engine, a partir da linha
de comando, existe uma pequena aplicação dentro do diretório de testes.
None
Ela existe básicamente por que não existe um jeito de
se testar uma Rails Engine fora de uma aplicação Rails
.gemspec
As dependências devem ser adicionadas nesse arquivo para evitar conflitos
na hora de plugar a engine
None
rails generate rspec:install
Obrigada!
Referências https://medium.com/@amandasposito/rails-engines-e-rspec-6e7a8645dc5b#.nemad0vpz http://rspec.info/ http://guides.rubyonrails.org/engines.html https://www.bignerdranch.com/blog/intro-to-rails-engines/ http://stackoverflow.com/questions/6118905/rails-3-1-engine-vs-mountable-app