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
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
Amanda
January 21, 2016
Technology
0
230
Rails Engines & RSpec
Amanda
January 21, 2016
Tweet
Share
More Decks by Amanda
See All by Amanda
Lessons Learned From an Elixir OTP Project
amandasposito
2
94
Aprendizados de um projeto Elixir OTP
amandasposito
4
620
SOLID - Dependency inversion principle
amandasposito
0
86
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
97
Other Decks in Technology
See All in Technology
組織全体で実現する標準監視設計
yuobayashi
2
480
[JAWS DAYS 2026]私の AWS DevOps Agent 推しポイント
furuton
0
140
SRE NEXT 2026 CfP レビュアーが語る聞きたくなるプロポーザルとは?
yutakawasaki0911
0
230
決済サービスを支えるElastic Cloud - Elastic Cloudの導入と推進、決済サービスのObservability
suzukij
2
590
AWS DevOps Agent vs SRE俺 / AWS DevOps Agent vs me, the SRE
sms_tech
3
530
A Gentle Introduction to Transformers
keio_smilab
PRO
2
1k
トップマネジメントとコンピテンシーから考えるエンジニアリングマネジメント
zigorou
4
840
「ストレッチゾーンに挑戦し続ける」ことって難しくないですか? メンバーの持続的成長を支えるEMの環境設計
sansantech
PRO
3
630
Kaggleの経験が実務にどう活きているか / kaggle_findy
sansan_randd
7
1.4k
作りっぱなしで終わらせない! 価値を出し続ける AI エージェントのための「信頼性」設計 / Designing Reliability for AI Agents that Deliver Continuous Value
aoto
PRO
2
270
OCI技術資料 : コンピュート・サービス 概要
ocise
4
54k
DevOpsエージェントで実現する!! AWS Well-Architected(W-A) を実現するシステム設計 / 20260307 Masaki Okuda
shift_evolve
PRO
3
540
Featured
See All Featured
Heart Work Chapter 1 - Part 1
lfama
PRO
5
35k
エンジニアに許された特別な時間の終わり
watany
106
240k
Build The Right Thing And Hit Your Dates
maggiecrowley
39
3.1k
Ten Tips & Tricks for a 🌱 transition
stuffmc
0
84
Reflections from 52 weeks, 52 projects
jeffersonlam
356
21k
New Earth Scene 8
popppiees
1
1.7k
Mozcon NYC 2025: Stop Losing SEO Traffic
samtorres
0
170
Bootstrapping a Software Product
garrettdimon
PRO
307
120k
The MySQL Ecosystem @ GitHub 2015
samlambert
251
13k
KATA
mclloyd
PRO
35
15k
Ethics towards AI in product and experience design
skipperchong
2
220
State of Search Keynote: SEO is Dead Long Live SEO
ryanjones
0
150
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