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
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
600
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
オンプレとGoogle Cloudを安全に繋ぐための、セキュア通信の勘所
waiwai2111
3
1.1k
JAWS DAYS 2026 CDP道場 事前説明会 / JAWS DAYS 2026 CDP Dojo briefing document
naospon
0
120
EMからVPoEを経てCTOへ:マネジメントキャリアパスにおける葛藤と成長
kakehashi
PRO
6
670
管理者向けGitHub Enterpriseの運用Tips紹介: 人にもAIにも優しいプラットフォームづくり
yuriemori
0
110
生成AI活用によるPRレビュー改善の歩み
lycorptech_jp
PRO
5
2k
Serverless Agent Architecture on Azure / serverless-agent-on-azure
miyake
1
130
トップマネジメントとコンピテンシーから考えるエンジニアリングマネジメント
zigorou
3
470
Devinを導入したら予想外の人たちに好評だった
tomuro
0
850
Snowflakeデータ基盤で挑むAI活用 〜4年間のDataOpsの基礎をもとに〜
kaz3284
1
330
実録・Platform Engineering 失敗から学び、AI時代の波を乗りこなす技術
sansantech
PRO
1
100
Contract One Engineering Unit 紹介資料
sansan33
PRO
0
14k
三菱UFJ銀行におけるエンタープライズAI駆動開発のリアル / Enterprise AI_Driven Development at MUFG Bank: The Real Story
muit
11
20k
Featured
See All Featured
Dominate Local Search Results - an insider guide to GBP, reviews, and Local SEO
greggifford
PRO
0
93
The Success of Rails: Ensuring Growth for the Next 100 Years
eileencodes
47
8k
Optimizing for Happiness
mojombo
378
71k
How to audit for AI Accessibility on your Front & Back End
davetheseo
0
200
How To Stay Up To Date on Web Technology
chriscoyier
790
250k
Navigating Algorithm Shifts & AI Overviews - #SMXNext
aleyda
1
1.1k
How People are Using Generative and Agentic AI to Supercharge Their Products, Projects, Services and Value Streams Today
helenjbeal
1
130
<Decoding/> the Language of Devs - We Love SEO 2024
nikkihalliwell
1
150
SEOcharity - Dark patterns in SEO and UX: How to avoid them and build a more ethical web
sarafernandez
0
130
It's Worth the Effort
3n
188
29k
Become a Pro
speakerdeck
PRO
31
5.8k
Typedesign – Prime Four
hannesfritz
42
3k
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